Commit Graph

30 Commits

Author SHA1 Message Date
Vitaliy Vlasov 4f722b6fe8 Communities encryption integration 2022-06-17 21:24:39 +03:00
Pascal Precht 9d5bcc3c60 feat: sync `CommunitySettings` across paired devices
This commit introduces a new `clock` field in the
`communities_settings` table so that it can be leveraged for syncing
community settings across devices.

It alsoe exends existing `syncCommunity` APIs to generate
`SyncCommunitySettings` as well, avoiding sending additional sync messages
for community settings.

When editing communities however, we still sync community settings
explicitly are we aren't syncing the community itself in that case.
2022-06-16 12:45:05 +02:00
Vitaliy Vlasov 011238b1d1 Wallet sync 2022-05-18 15:25:20 +03:00
Pascal Precht 714c03c635 feat: introduce `CommunityAdminSettings` in `CommunityDescription`
This allows to store community admin settings that are meant to be propagated
to community members (as opposed to the already existing
`CommunitySettings` which are considered local to every account).

The first setting introduced as part of this commit is one that enables
community admins to configure whether or not members of the community
are allowed to pin messages in community channels.

Prior to this commit, this was not restricted at all on the protocol
level and only enforced by clients via UI (e.g. members don't see an
option to pin messages, although they could).

This config setting now ensures that:

1. If turned off, members cannot send a pin message
2. If turned off, pin messages from members are not handled/processed

This is needed by https://github.com/status-im/status-desktop/issues/5662
2022-05-18 09:58:11 +02:00
Andrea Maria Piana 4d15ae8a85 Upgrade to go 1.18 2022-05-11 12:39:54 +01:00
Pascal Precht 3b3921f483 Make community owners store waku message payloads
This is needed so that when they are bundled into archives, receiving
nodes can still verify the messages payload using its signature.

This commit introduces a new `waku_messages` table and APIs to store
such messages. Waku message payload is store for any message that has
a topic that matches any of the admin communities chats.

Closes #2566
2022-03-28 11:24:23 +02:00
Andrea Maria Piana f0d3e0419d Backup communities 2022-03-23 14:45:52 +00:00
Pascal Precht 86926258ee Intrododuce `NodeConfig.TorrentConfig` and CLI flags
This commit introduces a new `TorrentConfig` as per #2563 with dedicated
default values and new options/flags for the status-go CLI.

Since it's part of `NodeConfig`, which is stored per user in the
database, this commit also adds a migration script that adds a new
`torrent_config` table and database APIs to insert and retreive the
torrent config.

Closes #2563
2022-03-21 12:59:09 +01:00
Samuel Hawksby-Robinson 89251e8416
Sync Communities (#2253)
* Added community sync protobuf

* Updated community sync send logic

* Integrated syncCommunity handling

* Added synced_at field and tidied up some other logic

* persistence testing

* Added testing and join functionality

* Fixed issue with empty scan params

* Finshed persistence tests for new db funcs

* Midway debug of description not persisting after sync

* Resolved final issues and tidied up

* Polish

* delint

* Fix error not handled on SetPrivateKey

* fix infinite loop, again

* Added muted option and test fix

* Added Muted to syncing functions, not just in persistence

* Fix bug introduced with Muted property

* Added a couple of notes for future devs

* Added most of the sync RequestToJoin functionality

Tests need to be completed and tests are giving some errors

* Finished tests for getJoinedAndPending

* Added note

* Resolving lint

* Fix of protobuf gen bug

* Fixes to community sync tests

* Fixes to test

* Continued fix of e2e

* Final fix to e2e testing

* Updated migration position

* resolve missing import

* Apparently the linter spellchecks

* Fix bug from  #2276 merge

* Bug fix for leaving quirkiness

* Addressed superfluous MessengerResponse field

* Addressed feedback

* VERSION bump
2021-08-06 16:40:23 +01:00
Andrea Maria Piana c55659b4f6
Add community notifications (#2160)
This commit introduces the following changes:

- `local-notifications` require as body an interface complying with
`json.Marshaler`
- removed unmarshaling of `Notifications` as not used (we only Marshal
notifications)
- `protocol/messenger.go` creates directly a `Notification` instead of
having an intermediate format
- add community notifications on request to join
- move parsing of text in status-go for notifications
2021-03-31 18:23:45 +02:00
Samuel Hawksby-Robinson 48a34072bb Added ChatIdentity attachment to ContactCodeAdvert 2020-12-17 14:10:00 +01:00
Jonathan Rainville b2d8f7f416
feat: add bookmarks table for the browser bookmarks
plus get bookmark icon using a lib
2020-11-16 13:31:34 -05:00
Andrea Maria Piana 3c6b741f71
Add tests for send notification & review feedback 2020-09-09 21:22:34 +02:00
Andrea Maria Piana 00c5b60d7f
Move message to common namespace 2020-09-09 21:22:12 +02:00
Andrea Maria Piana d7222c89e0
shuffle servers and limit & filter by chat id 2020-08-27 18:54:28 +02:00
Andrea Maria Piana 4cf491ae38
add push notification type 2020-08-18 16:29:58 +02:00
Andrea Maria Piana 91074ac95e
Add apn-topic & token-type set by the client 2020-08-18 16:29:31 +02:00
Andrea Maria Piana 4b8739a8bc
Polish up and address review feedback 2020-07-27 08:51:28 +02:00
Andrea Maria Piana 58817aad5b
Use separate flag for allowonlyfromcontacst 2020-07-27 08:51:20 +02:00
Andrea Maria Piana 12a3c5a31a
Add version to notification info 2020-07-27 08:51:18 +02:00
Andrea Maria Piana 3f4575b802
Add grant validation 2020-07-27 08:51:07 +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 15a3b710a0
Add parsing of messages 2020-07-27 08:50:58 +02:00
Andrea Maria Piana 927f762589
Send gorush notifications 2020-07-27 08:50:57 +02:00
Andrea Maria Piana 52da9de0c6
Handle query from client 2020-07-27 08:50:56 +02:00
Andrea Maria Piana a15919527b
implement handle push notification registration 2020-07-27 08:50:54 +02:00
Andrea Maria Piana c5077609ee
remove push notification preferences 2020-07-27 08:50:50 +02:00
Andrea Maria Piana e19c799be2
Remove PushNotificationRegister as we can use ApplicationMessage as a wrapper 2020-07-27 08:50:48 +02:00
Andrea Maria Piana 92b699b59d
Add push notification register message 2020-07-27 08:50:47 +02:00