Commit Graph

67 Commits

Author SHA1 Message Date
Andrea Maria Piana 5545ed18f2
Add markdown 2019-11-15 08:46:52 +01:00
Adam Babik ef12bd7782
Improve codebase related to transactions (#103) 2019-11-12 08:17:53 +01:00
Adam Babik 44e7fe793b
Rearrange datasync methods (#116) 2019-11-11 20:51:51 +01:00
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 ac9bf97fb3
Implement requesting historic messages (#108) 2019-11-06 08:14:52 +01:00
Adam Babik 8cdd5d0a2f
Remove indirect status-go dependency (#111) 2019-11-05 18:36:37 +01:00
Andrea Maria Piana 9e44c7e51e
Marshal json hash 2019-11-02 20:33:40 +01:00
Andrea Maria Piana 019becdcbb
Add last-message-clock-value 2019-10-31 18:34:50 +01:00
Andrea Maria Piana 9c229ef5d7
Add ens names verification 2019-10-31 17:32:19 +01:00
Andrea Maria Piana b49183afca
Handle nil public keys & nil chat id 2019-10-31 17:11:17 +01:00
Andrea Maria Piana e3b3ba39f3
Handle DH double ratchet errors
Errors when generating a DH secret where silently ignored, resulting in
invalid key material being used.
This commit fixes the issue by upgrading the double ratchet library
 and implementing the updated interface, which uses now slices instead of fixed bytes keys.
2019-10-31 16:22:44 +01:00
Adam Babik 143453d660
Adjust logs when sending messages (#96) 2019-10-18 17:47:22 +02:00
Adam Babik 7848760037
Remove custom function for public key marshaling (#101) 2019-10-18 17:01:49 +02:00
Adam Babik cd92766d85
Upgrade migrate (#97) 2019-10-14 13:05:02 +02:00
Adam Babik 1859f6c80c
Implement group messages logic (#86) 2019-10-13 20:16:43 +02:00
Pedro Pombeiro 17cb8c53c3
Move `transport/whisper/gethbridge` to `bridge/geth` (#95) 2019-10-11 15:01:45 +02:00
Pedro Pombeiro 6e0c9c232e
Remove extra `close` call left behind by mistake (#94) 2019-10-11 06:30:49 +02:00
Pedro Pombeiro fd48aa7527
Add dependabot config file (#92) 2019-10-10 18:13:51 +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 470cce3065
upgrade go-ethereum to 1.9.5 and Whisper (#85) 2019-10-02 12:50:03 +02:00
Adam Babik fb57d64bcf
Implement signing MembershipUpdate message (#78) 2019-09-30 17:11:30 +02:00
Andrea Maria Piana cc44ddb7ce
Revert "Make database optional (#72)"
This reverts commit 3fa3648db9.
2019-09-26 10:12:15 +02:00
Andrea Maria Piana 1e2e007bc6
Add identicon and gfycat generated names 2019-09-26 06:43:11 +02:00
Adam Babik 3fa3648db9
Make database optional (#72) 2019-09-24 17:36:53 +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
Andrea Maria Piana f51fd2e639
Remove deprecated bundle field 2019-09-10 13:33:37 +02:00
Andrea Maria Piana 8a6d5a6b49
Add LastMessageTimestamp
Following the already established pattern, we add another denormalized
field, lastMessageTimestamp, to be used in a similar way as the rest.
2019-09-02 10:51:07 +02:00
Adam Babik 31e37fa448
Add data sync tests (#63) 2019-08-31 16:56:28 +02:00
Adam Babik 1f260e9ec1
add new-migration Makefile target (#56) 2019-08-29 22:08:10 +02:00
Adam Babik 7d230faaa7
use v0.0.21 mvds tag (#64) 2019-08-29 11:07:19 +02:00
Adam Babik 0dd1cd585b
Replace adapter with message processor (#58) 2019-08-29 09:01:59 +02:00
Andrea Maria Piana 822d18916e
pass logger to mvds 2019-08-29 08:11:19 +02:00
Andrea Maria Piana 1646cd6771
Add persistent datasync 2019-08-28 09:47:58 +02:00
Adam Babik 287f9aa26c
add Messenger.Init() (#55) 2019-08-25 17:48:37 +02:00
Andrea Maria Piana ceab77db19
Remove sqlite persistence
Currently there seem to be a bug with publishing the contact-code, and
each attempt result in the error `database is closed` (non-thread safe?). As discussed
previously we probably don't need to have fs persistence, so just
changing this to have it in memory.
2019-08-22 10:39:21 +02:00
Andrea Maria Piana e85b4509ba
Use wrapped payload for id calculation 2019-08-21 07:31:56 +02:00
Andrea Maria Piana 9f0db157bf
Omit empty fields for group membership updates 2019-08-20 11:20:21 +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
Adam Babik 747ad73985
Merge filter package into transport/whisper (#46) 2019-08-06 17:33:32 +02:00
Andrea Maria Piana baa579640f
Move contacts to status-protocol-go & add delete chat endpoint
Adds to api calls, Contacts() not paginated and SaveContact()

DeviceInfo and SystemTags have been stored as a blob to simplify
querying, although at some point we might want to query system tags (for
example to fetch all the blocked/added by us/added by them contacts),
but not a use case for now.
2019-08-04 22:06:05 +02:00
Andrea Maria Piana b742356b68
Add chats API calls
This commits adds two API calls:

SaveChat
GetChats

The first one behaves like an upsert.
The second takes two parameters, from, to and returns chats in reverse
order by timestamp.

Members and MembershipUpdates have been stored as blob of data to
simplify the querying (we never query them separately).
2019-08-02 07:38:20 +02:00
Adam Babik f102941b62
Unify logging in tests (#38) 2019-07-30 20:36:42 +02:00
Andrea Maria Piana 2b1da5519d
Update datasync comment & add test for encrypted messages 2019-07-30 09:03: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