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 19, 2023
1 parent a596bcb commit 2b29f40
Show file tree
Hide file tree
Showing 28 changed files with 791 additions and 514 deletions.
138 changes: 81 additions & 57 deletions appdatabase/migrations/bindata.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX user_messages_response_to ON user_messages(response_to);
108 changes: 54 additions & 54 deletions appdatabase/migrationsprevnodecfg/bindata.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ require (
github.com/ipfs/go-log/v2 v2.5.1
github.com/ladydascalie/currency v1.6.0
github.com/meirf/gopart v0.0.0-20180520194036-37e9492a85a8
github.com/waku-org/go-waku v0.5.3-0.20230404182041-41691a44e579
github.com/schollz/peerdiscovery v1.7.0
github.com/waku-org/go-waku v0.5.3-0.20230404182041-41691a44e579
github.com/yeqown/go-qrcode/v2 v2.2.1
github.com/yeqown/go-qrcode/writer/standard v1.2.1
go.uber.org/multierr v1.8.0
Expand Down
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 2b29f40

Please sign in to comment.