Skip to content

Commit

Permalink
Fix some issues with pinned messages
Browse files Browse the repository at this point in the history
There were a couple of issues on how we handle pinned messages:

1) Clock of the message was only checked when saving, meaning that the
   client would receive potentially updates that were not to be
   processed.
2) We relied on the client to generate a notification for a pinned
   message by sending a normal message through the wire. This PR changes
   the behavior so that the notification is generated locally, either on
   response to a network event or client event.
3) When deleting a message, we pull all the replies/pinned notifications
   and send them over to the client so they know that those messages
   needs updating.
  • Loading branch information
cammellos committed Apr 20, 2023
1 parent 272173c commit 5af3563
Show file tree
Hide file tree
Showing 27 changed files with 801 additions and 510 deletions.
116 changes: 58 additions & 58 deletions appdatabase/migrations/bindata.go

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions appdatabase/migrationsprevnodecfg/bindata.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions mailserver/migrations/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions multiaccounts/migrations/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions protocol/anonmetrics/migrations/migrations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions protocol/common/pin_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ type PinMessage struct {
Identicon string `json:"identicon"`
// Random 3 words name
Alias string `json:"alias"`

Message *PinnedMessage `json:"pinnedMessage"`
}

type PinnedMessage struct {
Expand Down
Loading

0 comments on commit 5af3563

Please sign in to comment.