funyahoo-plusplus icon indicating copy to clipboard operation
funyahoo-plusplus copied to clipboard

Old messages reappear after login

Open joe935 opened this issue 7 years ago • 22 comments

Since installing your Yahoo DLL, every time Pidgin is started all messages since the install of Plugin, are back in each IM window, even though i have done a clear scrollback for each IM window. Is there another way to clear the messages so the are gone permanently ? Thanks for the plugin.

joe935 avatar Sep 06 '16 18:09 joe935

I am having a similar issue but I did some digging and may have additional information

First of all, If I close all the auto-opened windows and restart Pidgin, repeating it several times, eventually most of the windows will no longer auto-open.

The only one that keeps opening persistently, is a "group chat" for one of my buddies. It is presented in Pidgin as a "room" and no actual conversation is shown in it other than "XXX entered the room" messages.

This conversation always opens when I start the plugin.

Here's a excerpt of the messages Yahoo sends that contains the conversation's ID (sanitized):

"xxxxxxxxxxxxxxxxxxxxxxxxxA" - the group "xxxxxxxxxxxxxxxxxxxxxxxxxI" - me "xxxxxxxxxxxxxxxxxxxxxxxxxQ" - "live" ID of buddy "xxxxxxxxxxxxxxxxxxxxxxxxxM" - "dead" ID of buddy

{
  "msg":"SessionOpened",
  "userId":"xxxxxxxxxxxxxxxxxxxxxxxxxI",
  "deviceId":"55c03d2c64c0009a",
  "accessToken":"xxxxxxxxxxxxxxxxxxxxxxxxxI.xxxxxxxxxxxxxxxxxxxxxxxxxx",
  "sessionToken":"xxxxxxxxxxxxxxxxxxxxxxxxxI.xxxxxxxxxxxxxxxxxxxxxxxxxx.30e0d0ed5545c152",
  "channelId":"1f4b331f",
  "sessionType":"mobile",
  "idleTimeoutMs":14400000,
  "batch":[

// ...

    {
      "msg":"NewEntity",
      "key":[
        "GroupPrivate",
        "xxxxxxxxxxxxxxxxxxxxxxxxxA"
      ],
      "cn":2,
      "lastClearedItemId":"55b9ee2c2540009a",
      "createdTime":1454790052180,
      "notificationsSuspendedUntil":0,
      "group":[
        "Group",
        "xxxxxxxxxxxxxxxxxxxxxxxxxA"
      ],
      "user":[
        "User",
        "xxxxxxxxxxxxxxxxxxxxxxxxxI"
      ]
    },

// ...

  ]
}

-----------------------------------------------

{
  "seq":9,
  "ack":2,
  "data":[
    [

// ...

      {
        "msg":"NewEntity",
        "key":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA"
        ],
        "cn":102,
        "name":"",
        "defaultGroup":false,
        "groupId":"xxxxxxxxxxxxxxxxxxxxxxxxxA",
        "createdTime":1454790052180,
        "memberCount":2,
        "lastItemId":"55b9ee2c2540009a",
        "defaultGroupOtherUser":[
          "User",
          "xxxxxxxxxxxxxxxxxxxxxxxxxQ"
        ]
      },
      {
        "msg":"NewEntity",
        "key":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA",
          "members",
          "54AE0FA25500004A"
        ],
        "cn":5,
        "lastReadItemId":"55b9ee2c2540009a",
        "admin":true,
        "invitationState":"joined",
        "createdTime":1454790052180,
        "group":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA"
        ],
        "user":[
          "User",
          "xxxxxxxxxxxxxxxxxxxxxxxxxI"
        ]
      },
      {
        "msg":"NewEntity",
        "key":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA",
          "members",
          "54DFFCB3D0000018"
        ],
        "cn":4,
        "lastReadItemId":"54f0d24aad42000c",
        "admin":false,
        "invitationState":"joined",
        "invitedBy":[
          "User",
          "xxxxxxxxxxxxxxxxxxxxxxxxxI"
        ],
        "createdTime":1458140532544,
        "group":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA"
        ],
        "user":[
          "User",
          "xxxxxxxxxxxxxxxxxxxxxxxxxQ"
        ]
      },
      {
        "msg":"NewEntity",
        "key":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA",
          "members",
          "54AE0FA25501004A"
        ],
        "cn":2,
        "lastReadItemId":"54ae0fa25502004a",
        "admin":false,
        "invitationState":"merged",
        "invitedBy":[
          "User",
          "xxxxxxxxxxxxxxxxxxxxxxxxxI"
        ],
        "createdTime":1454790052180,
        "group":[
          "Group",
          "xxxxxxxxxxxxxxxxxxxxxxxxxA"
        ],
        "user":[
          "User",
          "xxxxxxxxxxxxxxxxxxxxxxxxxM"
        ]
      },
    ]

// ...

  ],
  "time":1473189819114
}

alexolog avatar Sep 06 '16 20:09 alexolog

Skipping old messages is currently done by waiting for a SyncComplete message. Unfortunately that doesn't seem to mean what I thought it was, since sometimes yahoo sends old messages after it too.

The groupchat thing is a different problem and might be easier to deal with (likely something like 44df619ed477b803fda54cc74bdcad6a76b3ecc0 but with a different if)

dequis avatar Sep 07 '16 00:09 dequis

Adding my "me too" here. It was working normally, then two days ago it started bringing up old conversations again... this time regular chats, not just ones with URLs.

One thing I want to add here though, the message replay is coming from Yahoo, not from pidgin. The conversations that popped up this morning on my work computer are from chats I had last night on my home computer.

Shdwdrgn avatar Sep 07 '16 14:09 Shdwdrgn

Regarding my previous comment, I was mistaken. The windows are opening again on every protocol restart.

alexolog avatar Sep 07 '16 19:09 alexolog

from what i have seen.... old messages will continue to show unless you clear each of the old conversation (I was able to clear the old conversations via yahoo mail website)

geniuswithaces avatar Sep 10 '16 23:09 geniuswithaces

The linked commit handles the issue with old messages after SyncComplete that I mentioned in my previous comment, which should be most of this.

Also the windows build url changed to http://dequis.org/libyahoo-plusplus.dll

dequis avatar Sep 12 '16 03:09 dequis

But when comes SyncComplete? I keep getting all the old messages.

msdobrescu avatar Sep 15 '16 06:09 msdobrescu

The groupchat thing is a different problem and might be easier to deal with (likely something like 44df619 but with a different if)

Should a new ticket be opened for it?

alexolog avatar Sep 17 '16 14:09 alexolog

Sure.

I believe the main issue here is still not completely fixed because yahoo is random as hell.

dequis avatar Sep 17 '16 15:09 dequis

Another minor problem is my name is listed two times in the contact list, And that is using the new file.

joe935 avatar Sep 17 '16 15:09 joe935

That's #2

dequis avatar Sep 17 '16 15:09 dequis

I am hitting this issue also. Could this plugin purge yahoo's conversation history (on yahoo) after displaying them?

dbeusee avatar Sep 18 '16 20:09 dbeusee

Clearing the server-side conversation history breaks things, like making conversations disappear forever. Don't do that.

dequis avatar Sep 18 '16 21:09 dequis

It doesn't "break" anything. I've cleared mine a few times already. Anyone using pidgin doesn't care about maintaining the conversation history on the server side. Pidgin keeps the conversation log on your disk, just like it did with the old protocol. Better to clear the history on the server rather than keep being bothered by old conversations on every startup. If you have an alternate solution that one of you plugin maintainers will implement, let's hear it. At least make it an option! Some people don't want yahoo keeping all that history anyway.

dbeusee avatar Sep 18 '16 22:09 dbeusee

Quoting my own comment from a different ticket (would have done it before but i was replying from phone)

So I've been testing this "clear conversation" thing and it seems this issue affects the official client too.

Say Alice and Bob are having a conversation with the web client

  • Alice does "clear conversation", which wipes the server side logs and the conversation is hidden from the UI.
  • Bob doesn't get notified of this.
  • When Bob tries to talk to that conversation, Alice doesn't see those messages.
  • If Alice accesses the /group/ URL directly, she can see those messages.
  • If Alice tries to start a new conversation by searching for Bob and sending a message, she gets that /group/ URL again with the messages that were sent by Bob.
  • Even after doing this, Bob never appears again in the recent conversations list of Alice.
  • When Alice doesn't have that conversation open, the messages from Bob are practically lost.

So, don't use the "clear conversation" feature, it's buggy and will break things.

If the other person used this and the messages aren't getting through, the only thing I can suggest is to start a named groupchat with only one member.

dequis avatar Sep 18 '16 22:09 dequis

When did you test this? I created a new yahoo account (B), and from that account, I sent a message to my original account that I use with pidgin (A). I received the message. Then I cleared the conversation from account A, and I was still able to send and receive from/to both accounts. I simply sent a new message using the compose icon from account B to account A. This does not create a group, right?

dbeusee avatar Sep 18 '16 23:09 dbeusee

this is just a educated guess from my observation.... It looks like yahoo is using threads where 1 message is linked to the next (I imagine a "Wall" Like FB ) When you clear it seems to Hide the Thread but if someone else still has it, its just hidden not deleted.

geniuswithaces avatar Sep 19 '16 14:09 geniuswithaces

I don't know what it's doing, but one thing is for sure, the new protocol is the buggiest thing I've seen in a long time. The old protocol was very reliable, and this new protocol sucks! It must be Verizon's doing. Today's testing with just browsers (I used IE for one account and Chrome for the other) shows that some messages go through, some don't. This is strictly via the browser on both sides. Then I cleared conversation on both sides. I then sent a message from A to B. Nothing showed up on B until B sent a message to A! Then I saw both new messages. This new yahoo protocol is not ready for prime time.

dbeusee avatar Sep 19 '16 22:09 dbeusee

The new protocol is what we have to use if we want to keep in touch with buddies that will not convert. For example, one of my buddies uses yahoo mail, and treats messaging as an extension of it. I cannot convince them to run a separate client so I'm stuck with this POS of a protocol for now.

Back on topic: is there any progress or insight on this issue?

alexolog avatar Oct 06 '16 22:10 alexolog

Apparently the new Yahoo server can't even keep its message history straight. This morning when I logged in it replayed 10 messages from the beginning of January, then above that was my conversation from yesterday.

I don't know if this is related to the message history or not, but I leave my computer at home logged in all the time, then I also log in when I get to work (both running pidgin on debian). I've noticed that my home computer, despite still saying it is logged in, does not seem to receive any messages through the day, and frequently misses messages that come in the evenings, even after I have update my status to available. Should I create a new ticket for this, or is it simply another issue that Yahoo won't fix on their end?

Shdwdrgn avatar Nov 22 '16 15:11 Shdwdrgn

I have the same problem like Shdwdrgn.

stefanleh avatar Nov 26 '16 13:11 stefanleh

I had to re-enable Yahoo to keep in touch with one contact that staunchly refuses to use anything else.

What I noticed is that every time they message me when I'm offline, when I start Pidgin up again, I get all the old messages between me and them. Over and over again.

This serves no purpose other than to make the history logs unnecessary bloated.

Is it possible to filter out those extra messages based on timestamps, by comparing to the last one received?

alexolog avatar Jun 09 '17 01:06 alexolog