Thanks for the implementation of secret chats, it works well. The only issue is that messages received from the other party in the secret chat dont get marked as read. This means for instance with disappearing messages, the messages dont disappear. Note that there exists focus events for terminals that you can use to mark messages read when the window is focused. Or for a simpler implementation simply mark messages as read when the user starts typing/sends a message.
Thanks for the implementation of secret chats, it works well. The only issue is that messages received from the other party in the secret chat dont get marked as read. This means for instance with disappearing messages, the messages dont disappear. Note that there exists focus events for terminals that you can use to mark messages read when the window is focused. Or for a simpler implementation simply mark messages as read when the user starts typing/sends a message.
In a terminal you turn on focus reporting by sending
<ESC>[1004h
and turn it off with<ESC>[1004l
. The terminal then sends<ESC>[I
for focus gained and<ESC>[O
for focus lost. https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-FocusIn_FocusOut