24 Commits

Author SHA1 Message Date
Volodymyr Kozieiev
9241903edb
Refactorings: whisper transport removed (#2200) 2021-04-22 16:36:18 +03:00
Andrea Maria Piana
f75f7bb738 Expand confirmations to private group chat messages
This commit expands the confirmation mechanism to allow private group
chat messages to be confirmed:

Changes:

- Added a separate table for message confirmations as group chat
messages have same messageID but multiple datasyncID
- Removed DataSyncID from raw message (I haven't removed the column name
as it can't be done in sqlite without copying over the table)
2021-03-16 13:41:14 +01:00
Andrea Maria Piana
f115b8d289 Request/Decline access to communities 2021-02-26 15:35:43 +01:00
Volodymyr Kozieiev
c38439e664
Listen for delivered messages (#2150) 2021-02-23 17:47:45 +02:00
Andrea Maria Piana
fb6411af24
Use personal topic for push notification registration
One of the issues we noticed is that the partitioned topic
in push notification is heavy in traffic, as any user using a particular
mailserver will use that partitioned topic to register for PNs.

This commit moves from the partitioned topic to the personal topic of
the PN server, so it does not clash with other users that might happen
to have the same partitioned topic as the mailserver, resulting in long
sync times.

Another issue that will need to be addressed separately is that once you
send a message to a topic, because of the way how waku/whisper works,
you will have to register to that topic, meaning that you will receive
that data. Currently waku does not support unsubscribing from a topic
without logging in and out, so that needs also to be addressed.
2021-01-26 09:39:53 +01:00
Andrea Maria Piana
9d2117e227
Send abridged version of history with messages in group chats
When sending a message in a private group chat we send the whole history
for redundancy and allow out-of-order processing.
This can be very expensive in some chats, resulting in long delay when
sending a message and calculating the POW.
This commit improves the performance  by only forwarding the events
necessary for the user to be able to construct a group chat and process
correctly the message.
2021-01-26 09:39:52 +01:00
Andrea Maria Piana
5d929c3584 Handle organisation membership requests 2020-12-23 17:20:55 +01:00
Andrea Maria Piana
6ad047d56f Fix datasync retry
This commit fixes a bug on the mvds library where the nextEpoch would be
incorrectly summed to the retry time, resulting in messages not being
retried, or retried much less frequently the longer the app was running.
It also updates the retry timing to backoff exponentially at multiple of
30 seconds.
2020-11-26 16:25:52 +01:00
Andrea Maria Piana
75e0809f50 Split datasync messages in batches
When sending messages in quick succession, it might be that multiple
messages are batched together in datasync, resulting in a single large
payload.
This commit changes the behavior so that we can pass a max-message-size
and we split the message in batches before sending.

A more elegant way would be to split at the transport layer (i.e
waku/whisper), but that would be incompatible with older client.

We can still do that eventually to support larger messages.
2020-11-05 12:45:29 +01:00
Andrea Maria Piana
8ee3c75510
Support for basic push notification for mentions 2020-09-09 21:22:13 +02:00
Andrea Maria Piana
541756c777
move contact code to subscription 2020-08-18 16:29:37 +02:00
Andrea Maria Piana
a1a6e1c6c0
linting 2020-07-30 20:21:00 +02:00
Andrea Maria Piana
2bf1991190
Use reflect.Value as ParsedMessage type and handle type case 2020-07-30 20:20:36 +02:00
Samuel Hawksby-Robinson
45c1e5ba1c
Updated MembershipUpdateMessage to use interfaced ChatEntity
Replaces ChatMessage only field
2020-07-30 20:20:31 +02:00
Samuel Hawksby-Robinson
3e857203ac
Created ChatEntity encoding per chat type 2020-07-30 20:20:29 +02:00
Andrea Maria Piana
0fb5ed2207 dont use a pointer for public methods 2020-07-29 12:51:48 +02:00
Andrea Maria Piana
4b8739a8bc
Polish up and address review feedback 2020-07-27 08:51:28 +02:00
Andrea Maria Piana
63af6aa79b
Use ephemeral keys for sending messsages 2020-07-27 08:51:27 +02:00
Andrea Maria Piana
d775bb888a
Handle retries & use sendChatMessage for e2e tests 2020-07-27 08:51:23 +02:00
Andrea Maria Piana
e89e36b081
Use resend automatically for datasync 2020-07-27 08:51:10 +02:00
Andrea Maria Piana
20fb8607cb
keep track of queries & actually send pns, hurray 2020-07-27 08:51:05 +02:00
Andrea Maria Piana
7e16f940de
Handle query response 2020-07-27 08:51:03 +02:00
Andrea Maria Piana
d985af4a7e
Implement server persistence for client & basic tests 2020-07-27 08:51:01 +02:00
Andrea Maria Piana
3afde67022
Move message processor to common and allow subscribing to sent messages 2020-07-27 08:51:00 +02:00