fix: markseen_msgs(): Mark reactions to specified messages as seen too (#7884)#7904
fix: markseen_msgs(): Mark reactions to specified messages as seen too (#7884)#7904
Conversation
2d25772 to
13a064d
Compare
13a064d to
fd6dcca
Compare
d38a41d to
b3a8c81
Compare
i checked android and iOS, here since forever, markseen_msgs is called unconditionally, so also for outgoing ones. @nicodh can you check that for desktop as well? @iequidoo i think, this information should be added to the docs as well, smth as "as markseen_msgs() is used also for synchronisation and to track last position, it should be called unconditionally for all messages that scroll into view, including outgoing and status messages" (or whatever the exact reason is) |
ffdba8c to
adad045
Compare
Done |
adad045 to
5d091ee
Compare
#7884) This allows to remove notifications for reactions from other devices. NB: UIs should pass all messages to markseen_msgs(), incl. outgoing ones. markseen_msgs() should be called when a message comes into view or when a reaction for a message being in view arrives. Also don't emit `MsgsNoticed` from receive_imf_inner() if the chat still contains fresh hidden messages, i.e. include reactions into this logic, to avoid removing notifications for reactions until they are seen on another device.
5d091ee to
a0e1a4b
Compare
| }, | ||
| |rows| { | ||
| for row in rows { | ||
| msgs.push(row?); |
There was a problem hiding this comment.
Can query_map_vec be used?
| UPDATE msgs SET state=? WHERE | ||
| state=? AND | ||
| hidden=0 AND | ||
| (hidden=0 OR hidden=1) AND |
There was a problem hiding this comment.
Is there any other value for hidden?
| " | ||
| SELECT COUNT(*) FROM msgs WHERE | ||
| state=? AND | ||
| (hidden=0 OR hidden=1) AND |
There was a problem hiding this comment.
I don't understand what hidden=0 OR hidden=1 means. Can this be removed? Is it a way to check for NULL? Does NULL ever get inserted?
This allows to remove notifications for reactions from other devices. NB: UIs should pass all messages to markseen_msgs(), incl. outgoing ones. markseen_msgs() should be called when a message comes into view or when a reaction for a message being in view arrives.
Also don't emit
MsgsNoticedfrom receive_imf_inner() if the chat still contains fresh hidden messages, i.e. include reactions into this logic, to avoid removing notifications for reactions until they are seen on another device.Close #7884