Two messages from one contact whereas one was sending with 2 accounts
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: email@example.com
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 ?
Replying to [comment:1 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.
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?
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 ?
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.
(In [d07ff24ba073fde83ca61c3a9c7c119bc3fec00e]) show only once unread messages at startup when we have twice the same contact in 2 accounts. Fixes #2921