Opened 10 years ago

Closed 7 years ago

#2921 closed defect (fixed)

Two messages from one contact whereas one was sending with 2 accounts

Reported by: bchomel@… Owned by: asterix
Priority: normal Milestone: 0.13
Component: chat Version: hg
Severity: normal Keywords:
Cc: Blocked By:
Blocking: OS: All

Description

I have 2 jabber accounts in Gajim and one contact for these 2 accounts. When this contact send me a message while i'm not connected, i receive 2 messages from him: One from each account ! Normally, i must receive the message just with the account where he send me the message. You can contact me in order to have more informations: nanard51@…

Change History (10)

comment:1 follow-up: Changed 10 years ago by asterix

explaination: first account connects, got the message, put it in unread_message table (auto popup is off)

then second account connects, look at unread_message table, find it and shows it too.

Should we store the account name in unread table ? what to do if we change account name ?

comment:2 in reply to: ↑ 1 Changed 10 years ago by junglecow

Replying to asterix:

Maybe cache in memory whether message is already "taken care of"?

Should we store the account name in unread table ?

Also an option. (I'd suggest to store the JID then.)

what to do if we change account name ?

Or maybe more likely, what if the account is deleted? I guess you'd have to search the unread table for nonexisting accounts then, and display those.

comment:3 Changed 10 years ago by asterix

  • Milestone set to 0.12

or show a warning before deleting an account

comment:4 Changed 10 years ago by junglecow

Something should still be done in case Gajim slips up and misses something. Otherwise it's possible that some things will live in the "unread" table forever.

comment:5 Changed 8 years ago by steve-e

  • OS set to All

Jim++, you altered the unread message table code. Any idea how to solve this one?

comment:6 Changed 8 years ago by asterix

I have an idea:

add a column : shown_in_gui to the table.

when we launch Gajim, we reset all lines of this table to False, and first time we read an unread_message, we set it to True, so it's read only once.

but (there's always a but) we're not sure to show it in the correct account (as we don't save it).

if we want to show it in the correct group, we can add a account line with the JID of the account, but if we remove the account, unread_messages are here for ever.

and if we show it in the correct account, that means we have the same contact in 2 accounts, do we really care in which one he wrote?

comment:7 Changed 8 years ago by asterix

  • Milestone 0.12 deleted

until we have a good solution, I remove milestone.

comment:8 Changed 8 years ago by Jim++

Hum, it seems it's not reproducible anymore. Probably because of the introduction of sessions. Sadly, the reason is that it introduced a new bug : unread message are fired up only once. If you don't read them at the first-next-launch you will not see them anymore as new. Someone know why ? Is that wanted ?

comment:9 Changed 8 years ago by asterix

I can still repro: in Gajim I have account A and B, and User U is in both.

I connect account A, get a message from user C. Don't open it. Ctrl+C to kill Gajim. Restart Gajim, connect account B, I get the unread message.

I cannot repro your second "bug": If I don't open the message again, and do again Ctrl+C, when I'll restart Gajim I'll get this message again.

session has nothing to do here, session id is not saved in unread table, as it's useless.

comment:10 Changed 7 years ago by Yann Leboulanger <asterix@…>

  • Milestone set to 0.13
  • Resolution set to fixed
  • Status changed from new to closed

(In [d07ff24ba073fde83ca61c3a9c7c119bc3fec00e]) show only once unread messages at startup when we have twice the same contact in 2 accounts. Fixes #2921

Note: See TracTickets for help on using tickets.