isamert / scli

a simple terminal user interface for signal messenger (using signal-cli)
GNU General Public License v3.0
432 stars 40 forks source link

How to view messages that are not decrypted due to safety number changing #217

Closed mlncn closed 1 year ago

mlncn commented 1 year ago

Very glad for #213 so these messages are easy to see. Saw the ephemeral message about using signal-cli trust to be able to see the messages, but did not get the whole number. "Message not decrypted: safety number with +1234567890 has changed" in the conversation was very useful!

However… having done:

signal-cli trust -a +1234567890

the message in the conversation in scli still says the same: "[Message not decrypted: safety number with +1234567890 has changed]"

Is there a different signal-cli command to run, or some way to trigger scli to re-read the messages?

(Without the -a signal-cli trust said "You need to specify the fingerprint/safety number you have verified with -v SAFETY_NUMBER")

Thank you!!

exquo commented 1 year ago

After executing signal-cli trust …, the undecrypted messages get decrypted and printed on signal-cli's output. Currently, scli attempts to show both the newly decrypted message and the old "pseudo"-message / notification: "Message not decrypted..". But because they both have the same timestamp, scli might instead display the old notification twice.

This should indeed be fixed. Thank you for raising the issue! The correct behavior for scli would be to show just the decrypted messages when scli is launched after running signal-cli trust ….

The fix would only apply to the newly received messages. For the old messages, you can manually remove the "pseudo"-envelopes (having "message": "[Message not decrypted: ...") from scli's history file (while scli is not running).

exquo commented 1 year ago

Also, the decrypted messages might be shown out of order they've been sent in. This happens if signal-cli prints them out of order; and scli sorts the messages by their received timestamps (after #113).