Mark own messages as seen

This commit is contained in:
Roman Volosovskyi 2021-09-23 14:52:15 +03:00
parent 5793470fad
commit 181c06722f
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
0.88.3
0.88.4

View File

@ -707,6 +707,10 @@ func (m *Messenger) HandleChatMessage(state *ReceivedMessageState) error {
WhisperTimestamp: state.CurrentMessageState.WhisperTimestamp,
}
if common.IsPubKeyEqual(state.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
receivedMessage.Seen = true
}
err := receivedMessage.PrepareContent(common.PubkeyToHex(&m.identity.PublicKey))
if err != nil {
return fmt.Errorf("failed to prepare message content: %v", err)