cwtch/model
Sarah Jamie Lewis 4f6cba2900
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
Add Content Addressing to Timeline
In order to implement features like quoting/reply-to we need a way
to reference messages that have been previously sent in a way that
is compatible across domains (i.e. p2p and groups).

For groups we could use signature as a universal identifier, but we have
no such analog in p2p - (note that adding a signature to p2p would compromise the
deniability properties of that protocol and as such wasn't considered.)

This PR creates a new index in Timeline that allows messages to be looked
up by their sender + message body. GetMessagesByHash returns a list of
matching messages that can then be used for a variety of applications
e.g. reply-to or duplicate detection.

Implementing reply-to would then be as simple as including the
content-hash of the replied to message in the overlay envelope, looking
up that hash in the timeline and finding the most recent message that
predates the index of the current message.
2021-07-02 12:06:44 -07:00
..
attr Allow Peers to Store History 2020-07-08 15:25:19 -07:00
errors.go Sign and Check ToFU Server Bundle 2020-10-01 14:06:30 -07:00
group.go a few select staticcheck fixes 2021-06-02 12:09:15 -07:00
group_test.go Replace old GroupID with new Dervied GroupID 2021-05-14 11:26:04 -07:00
keyBundle.go a few select staticcheck fixes 2021-06-02 12:09:15 -07:00
keyBundle_test.go Upgrade Tapir, Log, Connectivity 2021-04-08 18:23:26 -07:00
message.go Add Content Addressing to Timeline 2021-07-02 12:06:44 -07:00
message_test.go Add Content Addressing to Timeline 2021-07-02 12:06:44 -07:00
profile.go Fix IsServer check in Invite 2021-06-09 13:38:11 -07:00
profile_test.go More test fixes 2021-06-09 14:00:34 -07:00