nchat icon indicating copy to clipboard operation
nchat copied to clipboard

Status of muted chats is not correctly synchronized

Open gilcu3 opened this issue 1 year ago • 3 comments

Description:

At least using Whatsapp, it seems that the status of muted chats is not correctly synchronized. In the phone apps you can mute a chat for a period, or forever. It seems nchat does not notice either when it is not running at the time of the chat change.

How to reproduce it:

with nchat closed, unmute a chat in whatsapp, then open nchat. The chat will still be muted.

Environment:

  • Version: master
  • OS / distro: Archlinux

gilcu3 avatar May 31 '24 08:05 gilcu3

Hi @gilcu3 - I did a quick test here and "manually" muting or unmuting a chat in WhatsApp (while nchat is not running) reflects correctly for me once nchat is started.

However, Mute for 8 hours / 1 week with automatic unmute might not work correctly. I'll need to check that.

d99kris avatar Jun 01 '24 08:06 d99kris

Hi @d99kris you are partly right, it does work manually muting or unmuting, except in this case:

I am using muted_position_by_timestamp=0, therefore muted chats appear at the end. At the beginning nchat is closed, the chat is muted. In another client the chat is unmuted. Then nchat is opened, the unmuted chat should go to the front (it has recent messages), but it remains in the back. Surprisingly if I open it, somehow nchat updates its state and the chat goes to the correct position.

The other case where muting is only by a period I think also doesnt work, but maybe it is just the same bug described before.

gilcu3 avatar Jun 01 '24 21:06 gilcu3

Hi @gilcu3 - ok thanks, that is useful information 👍

d99kris avatar Jun 02 '24 04:06 d99kris

Hi again - finally got a chance to look into this. I believe the issue should be fixed with above commit, but please let me know in case it's not.

d99kris avatar Jul 07 '24 12:07 d99kris

FYI - yesterday I found one more muted-related issue w.r.t. cached muted state, a fix was committed in 846bac8.

d99kris avatar Jul 21 '24 01:07 d99kris