Skip to content

Commit

Permalink
like this?
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronaaron committed Mar 31, 2024
1 parent 9ac5031 commit bfea7d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2134,6 +2134,7 @@ func (portal *Portal) HandleiMessage(msg *imessage.Message) id.EventID {

// If the message exists in the database, handle edits or retractions
if dbMessage != nil && dbMessage.MXID != "" {
// DEVNOTE: It seems sometimes the message is just edited to remove data instead of actually retracting it

if msg.IsRetracted ||
(len(msg.Attachments) == 0 && len(msg.Text) == 0 && len(msg.Subject) == 0) {
Expand All @@ -2146,7 +2147,7 @@ func (portal *Portal) HandleiMessage(msg *imessage.Message) id.EventID {
}

overrideSuccess = true
} else if msg.IsEdited && dbMessage.Part == 0 {
} else if msg.IsEdited && dbMessage.Part > 0 {

// Edit existing message
intent := portal.getIntentForMessage(msg, nil)
Expand Down

0 comments on commit bfea7d6

Please sign in to comment.