Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old messages reappear after login #30

Open
ghost opened this issue Sep 6, 2016 · 22 comments
Open

Old messages reappear after login #30

ghost opened this issue Sep 6, 2016 · 22 comments

Comments

@ghost
Copy link

ghost commented Sep 6, 2016

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.

@alexolog
Copy link

alexolog commented Sep 6, 2016

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
}

@dequis
Copy link
Collaborator

dequis commented Sep 7, 2016

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 44df619 but with a different if)

@Shdwdrgn
Copy link

Shdwdrgn commented Sep 7, 2016

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.

@alexolog
Copy link

alexolog commented Sep 7, 2016

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

@dequis dequis changed the title messages not deleted Old messages reappear after login Sep 10, 2016
@geniuswithaces
Copy link

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)

dequis added a commit that referenced this issue Sep 12, 2016
Doesn't really mean "sync complete" anymore, but whatever.

Yahoo sends that garbage in a random order. It probably makes sense
given some insane logic.

References #30
@dequis
Copy link
Collaborator

dequis commented Sep 12, 2016

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

@msdobrescu
Copy link

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

@alexolog
Copy link

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?

@dequis
Copy link
Collaborator

dequis commented Sep 17, 2016

Sure.

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

@ghost
Copy link
Author

ghost commented Sep 17, 2016

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

@ghost ghost closed this as completed Sep 17, 2016
@ghost ghost reopened this Sep 17, 2016
@dequis
Copy link
Collaborator

dequis commented Sep 17, 2016

That's #2

@dbeusee
Copy link

dbeusee commented Sep 18, 2016

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

@dequis
Copy link
Collaborator

dequis commented Sep 18, 2016

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

@dbeusee
Copy link

dbeusee commented Sep 18, 2016

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.

@dequis
Copy link
Collaborator

dequis commented Sep 18, 2016

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.

@dbeusee
Copy link

dbeusee commented Sep 18, 2016

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?

@geniuswithaces
Copy link

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.

@dbeusee
Copy link

dbeusee commented Sep 19, 2016

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.

@alexolog
Copy link

alexolog commented Oct 6, 2016

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?

@Shdwdrgn
Copy link

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?

@stefanleh
Copy link

I have the same problem like Shdwdrgn.

@alexolog
Copy link

alexolog commented Jun 9, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants