Commit Graph

21 Commits

Author SHA1 Message Date
Andrea Maria Piana 775d17008e
Add name to content
Sometimes messages have a `name` field in the `content` map.
This is used for the ENS name.
This commit adds the parsing of that field.
2019-11-07 13:28:21 +01:00
Andrea Maria Piana 03adc878d8
Enable parsing of messages 2019-11-06 14:14:58 +01:00
Adam Babik 1859f6c80c
Implement group messages logic (#86) 2019-10-13 20:16:43 +02:00
Pedro Pombeiro ef677358d8
Prepare API to support other implementations of ETH nodes- Wrap geth types so they don't leak from the library internals 2019-10-09 14:20:51 +02:00
Adam Babik 105b40ef0e
Validate MembershipUpdateEvent messages (#83) 2019-10-02 13:12:30 +02:00
Adam Babik fb57d64bcf
Implement signing MembershipUpdate message (#78) 2019-09-30 17:11:30 +02:00
Adam Babik 4492eb9779
Decode MembershipUpdate message (#76)
This change also adds CreatePrivateGroupTextMessage function to create a group message. Relates to #73
2019-09-23 10:52:59 +02:00
Adam Babik dbf4c4062e
Improve interface around chats and add matching messages against chats (#66) 2019-09-20 08:41:53 +02:00
Adam Babik 0dd1cd585b
Replace adapter with message processor (#58) 2019-08-29 09:01:59 +02:00
Andrea Maria Piana e85b4509ba
Use wrapped payload for id calculation 2019-08-21 07:31:56 +02:00
Andrea Maria Piana b9447aea36
Add replies, block contact, remove unused methods
This commit does a few things:
1) Add replies to messages, which are calculated at query time using a
join
2) Add a BlockContact api call that takes care of deleting messages from
a user, deleting the chat, and re-compute the denormalized values. As it
needs to run in a transaction, the method that it relies on take a
transaction as an optional parameter.
3) Change ID scheme for chats/contacts so that it's consistent across
messages/contacts

This is not compatible as I have modified a migration, but it's not a
problem as data compatibility can be broken
2019-08-20 08:54:10 +02:00
Adam Babik c2b7b022b7
move status-react compliant messages storage and API 2019-08-12 12:43:46 +02:00
Andrea Maria Piana e1f4f17baf
Add confirmations for datasync messages.
The signature of the `Raw` methods has been changed so that they return
the application messageID.
Clients will keep track of this ID and receive a notification through
the envelopesMonitor of the state of the envelopes (sent/expired).
Envelopes monitor is passed this ID as well.
We use an array of IDs as datasync messages might be batched.
2019-08-07 16:48:09 +02:00
Andrea Maria Piana 28b2244fed
Handle messages in raw method as well 2019-07-29 16:19:04 +02:00
Adam Babik 0a8bf4c10e
Consolidate databases and migrations (#36) 2019-07-27 14:27:31 +02:00
Andrea Maria Piana 3ad085fb9e
Add datasync
This commit adds the ability of reading and sending datasync messages.
Datasync messages are batched, so a single whisper message might
contain multiple protocol messages.
Datasync messages are parsed regardless of whether the datasync flag is
on, as this commit is backward compatible.

Sending messages is toggled off by default.
2019-07-26 14:09:24 +02:00
Pedro Pombeiro f5973102d8 Add `Messenger.RetrieveAll` method. Closes #24 (#26) 2019-07-26 08:19:03 +02:00
Andrea Maria Piana db4b2126d0 [Parts of #7] Wrap & signs messages if specified in config
Currently datasync propagates the unencrypted messages. This messages
might be relayed to a third party. We can't therefore rely on whisper
signature, as the author might not be the same as the relayer.

This commit wraps our current message in a protobuf record with an
optional signature.

If the signature is present it will be used to indicate the author of
the message, otherwise whisper is used.

It's not enabled by default as this is a breaking change and should go
live with v1. Decoding is backward compatible, so old messages will
still be read.

I have also changed the messageID scheme to use:
compressedBytesOfPk + Keccak256 of the encoded unencrypted payload, instead of the whisper ID.
2019-07-21 07:41:38 +02:00
Pedro Pombeiro 7101358d7d
Add option to enable legacy generic discovery topic. Closes #12 (#22) 2019-07-17 16:50:09 +02:00
Adam Babik 5c6039f77f
Refactor the library (#20) 2019-07-16 12:43:07 +02:00
Adam Babik e941e80f5c
move code from status-go and status-console-client 2019-07-08 11:21:21 +02:00