continuous-integration/drone/push Build is passingDetails
continuous-integration/drone/pr Build is passingDetails
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.