Commit Graph

477 Commits

Author SHA1 Message Date
Andrea Maria Piana 897bd0f58f Dont send notification to our own devices 2022-07-18 17:17:20 +01:00
Pascal Precht f6c9ec7838 refactor: Require request access for all communities
This commit introduces a few changes regarding users accessing
communities:

While the APIs still exist, community invites should no longer be
used, instead communities should merely be "shared".
Sharing a community to users allows users to "join" the community,
which in reality makes them request access to that community.
This means, users have to request access to any community, even if
the community has permissions set to NO_MEMBERSHIP
Only difference between ON_REQUEST and NO_MEMBERSHIP is that
ON_REQUEST communities require manual approval of the owner/admin
to access a community. NO_MEMBERSHIP communities accept
automatically (as soon as owner/admin receives the request).
This also implies that users are no longer optimistically added to the
member list of communities, but only after they have been accepted.

This introduces a bit of a message ping-pong for users to know that
someone is now part of a community
2022-07-08 13:16:12 +02:00
Andrea Maria Piana 6df2033179
Bump version to 0.102.7 2022-07-07 11:17:36 +01:00
Vitaliy Vlasov 3dee94e505 Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
Churikova Tetiana 63d6119794
goerli: add assets 2022-07-01 12:42:06 +02:00
Richard Ramos 2873e65a61
feat: community tags (#2708)
Signed-off-by: Richard Ramos <info@richardramos.me>

Co-authored-by: MishkaRogachev <mishkarogachev@gmail.com>
2022-06-24 09:40:12 -04:00
Samuel Hawksby-Robinson 62e212abf4 Fixed Suite test 2022-06-20 15:33:09 +01:00
Samuel Hawksby-Robinson 33a127e208 Version bump 2022-06-20 15:33:09 +01:00
Andrea Maria Piana 22669d0423 Add default contact request
If a contact update or a legacy contact request is sent, we create a
notification for the user in the activity center so it can be replied
to.
If at a later date a new contact request is received from the same user,
this will replace it, so the proper message can be displayed.
2022-06-20 10:44:08 +01: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
Samuel Hawksby-Robinson 05b8ddf57a
LAN connection string (#2653)
* Version bump

* Implemented lan connection string functionality

Also added more robust testing

* Added ConnectionParams struct and related funcs

* Add server mode to ConnectionParams
2022-06-15 16:36:17 +01:00
Samuel Hawksby-Robinson 7f149f93c1
Get preferred network IP and refactor server package to increase reusability (#2626)
* Added function to get preffered network IP

Also done some refactor work oon server package to make a lot more reusable

* Added server.Option and simplified handler funcs

* Added serial number deterministically generated from pk

* Debugging TLS server connection

* Implemented configurable server ip

When accessing over the network the server needs to listen on the network port and not localhost or 127.0.0.1 . Also the cert can now have a dedicated IP

* Refactor of URL funcs to use the url package

* Removed redundant Options pattern in favour of config param

* Added full server test using GetOutboundIP

* Remove references and usage of Server.port

The application does not need to set the port, we rely on the net.Listener to pick a port.

* Version bump

* Added ToECDSA func and improved cert testing

* Added error check in test

* Split Server types, embedding raw Server funcs into specialised server types

* localhost

* Implemented DNS and IP based cert gen

ios doesn't allow for restricted ip addresses to be used in a valid tls cert

* Replace listener handling with original port store

Also added handlers as a parameter of the Server
2022-06-15 15:49:31 +01:00
Andrea Maria Piana cc80f5753b
Bump version to 0.101.1 2022-06-13 13:48:37 +01:00
Andrea Maria Piana 09ba88c19d Join group on accepting activity center notification 2022-06-08 11:48:45 +01:00
Andrea Maria Piana ed67cc2a6c
Bump version to 0.100.2 2022-06-07 16:01:51 +01:00
Parvesh Monu 869942c05e
Stop download of stickers on canceling context (#2699) 2022-06-02 22:03:16 +05:30
Andrea Maria Piana 1bfde4c4cc Initial support for mutual contact requests 2022-05-31 09:12:36 +01:00
Sale Djenic 78cba969cc notifications settings end points added and `notification_settings` table 2022-05-26 11:49:08 +02:00
Andrea Maria Piana 4d15ae8a85 Upgrade to go 1.18 2022-05-11 12:39:54 +01:00
Pascal Precht d884749ebf Update version number 2022-05-10 11:27:31 +02:00
Richard Ramos 0048aaebcc
feat: add IPFS rate limiter for downloading stickers and use http server for retrieving stickers (#2611) 2022-05-09 09:07:57 -04:00
Andrea Maria Piana 640793fe85
Bump version to 0.98.5 2022-04-26 12:42:50 +01:00
Roman Volosovskyi c531bf2ca1
Fix syncing of adding contact after removal 2022-04-25 11:02:49 +02:00
Roman Volosovskyi 9de4eb3c8a
Backup deleted communities 2022-04-14 18:01:07 +02:00
Andrea Maria Piana 23c9618b0e Fix deserialization multiaccounts 2022-04-12 12:53:57 -04:00
Parvesh Monu 3050106595 Dismiss activity center notifications of group on leave or Mark read 2022-04-06 22:41:14 +05:30
Richard Ramos ca468e21e5 chore: bump go-waku 2022-04-06 10:36:06 -04:00
Parvesh Monu 724689086c
return muted chats in ChatsPreview call (#2617) 2022-04-01 14:20:38 +05:30
Samuel Hawksby-Robinson 3dd13e3642
refactor of node config so that node config upgrade inserts are handled distinctly from any other config inserts that may come in future (#2609) 2022-03-25 18:34:24 +00:00
Andrea Maria Piana a3c60528ef Use batches & don't shadow community var 2022-03-24 21:09:22 +00:00
Samuel Hawksby-Robinson e67592d556
Sync Settings (#2478)
* Sync Settings

* Added valueHandlers and Database singleton

Some issues remain, need a way to comparing incoming sql.DB to check if the connection is to a different file or not. Maybe make singleton instance per filename

* Added functionality to check the sqlite filename

* Refactor of Database.SaveSyncSettings to be used as a handler

* Implemented inteface for setting sync protobuf factories

* Refactored and completed adhoc send setting sync

* Tidying up

* Immutability refactor

* Refactor settings into dedicated package

* Breakout structs

* Tidy up

* Refactor of bulk settings sync

* Bug fixes

* Addressing feedback

* Fix code dropped during rebase

* Fix for db closed

* Fix for node config related crashes

* Provisional fix for type assertion - issue 2

* Adding robust type assertion checks

* Partial fix for null literal db storage and json encoding

* Fix for passively handling nil sql.DB, and checking if elem has len and if len is 0

* Added test for preferred name behaviour

* Adding saved sync settings to MessengerResponse

* Completed granular initial sync and clock from network on save

* add Settings to isEmpty

* Refactor of protobufs, partially done

* Added syncSetting receiver handling, some bug fixes

* Fix for sticker packs

* Implement inactive flag on sync protobuf factory

* Refactor of types and structs

* Added SettingField.CanSync functionality

* Addressing rebase artifact

* Refactor of Setting SELECT queries

* Refactor of string return queries

* VERSION bump and migration index bump

* Deactiveate Sync Settings

* Deactiveated preferred_name and send_status_updates

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-03-23 18:47:00 +00:00
Andrea Maria Piana f0d3e0419d Backup communities 2022-03-23 14:45:52 +00:00
Roman Volosovskyi 12ccff417d Pass opensea key from env 2022-03-21 13:21:48 +01:00
andrey 01b6988260 QuotedMessage image from http server 2022-03-21 10:33:08 +01:00
Andrea Maria Piana d60a6713fe Enable mailserver cycle by default
This commit enables mailserver cycle logic by default and make a few
changes:

1) Nodes are graylisted instead of being blacklisted for a set amount of
   time. The reason is that if we blacklist, any cut in connectivity
   might result in long delays before reconnecting, especially on spotty
   connections.

2) Fixes an issue on the devp2p server, whereby the node would not
   connect to one of the static nodes since all the connection slots
   where filled. The fix is a bit inelegant, it always connects to
   static nodes, ignoring maxpeers, but it's tricky to get it to work
   since the code is clearly not written to select a specific node.

3) Adds support to pinned mailservers

4) Add retries to mailservers requests. It uses a closure for now, I
   think we should eventually have a channel etc, but I'd leave that for
   later.
2022-03-19 08:56:22 +00:00
Richard Ramos 50ec6f97e0 feat: display name 2022-03-14 13:48:34 -04:00
Andrea Maria Piana 178124da07
Bump version to 0.94.13 2022-03-14 12:45:49 +00:00
jo-mut b4fb9be2cb Fix: recieved shared image message not being displayed 2022-03-14 10:59:26 +03:00
Richard Ramos 442d24a79f
chore: add status.prod fleet (#2583) 2022-03-11 15:48:51 -05:00
andrey 598b83757c load audio from http server 2022-03-01 15:58:32 +01:00
jo-mut 38a16b3554 disables notifications for muted chats 2022-02-25 00:49:17 +03:00
jo-mut 7d956bef94 resolved conflicts 2022-02-24 23:11:36 +03:00
Roman Volosovskyi b559c561d8
Fix deadlock on checking pending notification 2022-02-23 20:58:08 +01:00
andrey 3cc683587d prepare txs for ens register 2022-02-23 11:28:50 +01:00
Richard Ramos 10b44a254c feat: adding status.test fleet 2022-02-21 09:35:40 -04:00
frank 4cc53630d5 Sync bookmarks 2022-02-17 12:40:33 +00:00
frank 07b9c3c7de Sync clear history 2022-02-17 11:15:01 +00:00
Jonathan Rainville ece535aaf7
feat: add RequestCommunityInfoFromMailserverAsync (#2537)
This function doesn't wait for the response from mailservers, so the client has to rely on signals
2022-02-14 16:49:14 -05:00
Parvesh Monu 1c549f7d71
disable changing settings while registering for push notifications (#2527) 2022-02-11 18:07:10 +05:30
flexsurfer 5925b3b7cc
http server for images (#2418)
Serve images over HTTPS

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
Co-authored-by: Michele Balistreri <michele@bitgamma.com>
2022-02-10 18:19:34 +01:00
Parvesh Monu 54b35b0510
fix activity center unique constraint error (#2524) 2022-02-09 18:45:57 +05:30
Roman Volosovskyi fb1f95a38f
Mark history as fully synced on clearing chat history 2022-02-08 13:15:52 +02:00
andrey 2e8007c12d use token list from status-react 2022-02-01 12:44:34 +01:00
Andrea Maria Piana 3a330cc305
Bump version to 0.93.2 2022-01-18 16:37:22 +00:00
Richard Ramos 53f86fe2f1
fix: nodeconfig unmarshaling (#2488) 2022-01-13 13:31:08 -04:00
Richard Ramos ee41e30881
feat: extract node config from settings to individual tables (#2470) 2022-01-12 16:04:43 -04:00
Parvesh Monu f1569e4bde
fix membership requests on synced devices (#2477) 2022-01-10 17:34:52 +05:30
Roman Volosovskyi 36b4ecabbf
Set joined=message.clock on syncing pubchat creation 2021-12-24 16:47:28 +02:00
Roman Volosovskyi 64589fbd1f
Fetch synced_from and synced_to from db to avoid resetting values to zero 2021-12-17 12:30:35 +02:00
Andrea Maria Piana 612d8918ea Fix notification query 2021-12-10 15:36:59 +00:00
Richard Ramos ebd4511d24
fix: remove mailserver topic when deactivating a chat (#2460)
This fixes an issue where re-joining a chat does not load the messages again from the mailserver
2021-12-09 17:55:00 -04:00
Michele Balistreri 9feea4fe25
dont sync chats with pending notifications (#2458)
* dont sync chats with pending notifications
* set accepted/dismissed notifications as read
* activate chat if message is sent from us
2021-12-07 17:34:43 +03:00
Roman Volosovskyi 3564630c33
Allow sending messages offline (non-datasync messages) 2021-12-07 12:12:49 +02:00
Parvesh Monu 83c3849899
Decline pending group invites from user, when user is blocked (#2455) 2021-12-06 18:14:40 +05:30
Andrea Maria Piana 258cbb694f Save contact on unblock 2021-12-06 10:46:18 +00:00
Michele Balistreri 0867458f16
Sync activity center (#2443)
sync activity center
2021-12-02 17:23:02 +03:00
Andrea Maria Piana f60cf5cd47 Wait for p2p messages to be processed 2021-12-01 12:58:46 +00:00
Anthony Laibe 73c7ea57d1
feat: auto message (#2441)
Send message every 2 minutes to status-bot chat id
2021-11-29 14:11:55 +01:00
Roman Volosovskyi 7ef2efaabd
Support for binance chains 2021-11-27 10:47:57 +02:00
Anthony Laibe 25e1c64ef5
fix: iterate through message with batch topics (#2444)
When iterating, reuse the list of topics rather
than all topics
2021-11-26 12:59:53 +01:00
Parvesh Monu a65c873b8f
Decline pending group invitations from user, when user is banned (#2437) 2021-11-25 20:51:42 +05:30
Richard Ramos 87a033c249
bump go-waku (#2442) 2021-11-25 10:37:06 -04:00
Andrea Maria Piana ded81b7a51 Reject contact request endpoint 2021-11-23 14:11:43 +01:00
Andrea Maria Piana 1d752c087f Default to sent if confirmations not enabled 2021-11-22 11:18:09 +00:00
Andrea Maria Piana 272342fb6b Revert "Revert "Correctly process confirmations""
This reverts commit b4c4cf6241.
2021-11-22 11:18:09 +00:00
Parvesh Monu 478eb435b1
Allow user to be re-invited to the same group after leaving (#2431)
Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2021-11-19 20:02:04 +05:30
Andrea Maria Piana b4c4cf6241
Revert "Correctly process confirmations"
This reverts commit 1b9bc4450c.
2021-11-18 17:19:41 +00:00
Roman Volosovskyi 0be1b44642
fix mistake in sql query 2021-11-18 14:35:24 +02:00
Volodymyr Kozieiev 1b9bc4450c Correctly process confirmations 2021-11-17 09:28:09 +00:00
Andrea Maria Piana f04e5c741c unblock contact endpoint 2021-11-15 18:53:35 +00:00
Roman Volosovskyi 53bbfb3f08
Allow sending messages offline 2021-11-11 19:12:31 +02:00
Anthony Laibe c95c29bba5 feat: Push messages to telemetry server when receiving messages 2021-11-10 09:34:14 +01:00
Roman Volosovskyi 4a0ad1cf69
[pairing] Sync read messages 2021-11-02 10:02:27 +02:00
Andrea Maria Piana 2d13fa1e25 Add logging of message-id 2021-11-01 11:53:08 +00:00
Parvesh Monu 9693d59e61
Online Status Indicator (#2408) 2021-10-28 20:51:28 +05:30
Parvesh Monu c20e8ebdef
Store Highlight field for identify new chats (#2384) 2021-10-21 22:34:56 +05:30
Andrea Maria Piana b79d68c696 Bump version to 0.89.13 2021-10-20 18:41:00 +01:00
andrey c7e758eeab [#12717] No preview for transaction messages in 1-1 chat 2021-10-20 15:45:07 +02:00
Andrea Maria Piana 23308d7e8c Allow profile pictures from contacts 2021-10-12 16:39:29 +01:00
Andrea Maria Piana 75aebd94ab Republish image on change of visibility settings 2021-10-08 14:36:30 +01:00
Richard Ramos 065defd35b
bump markdown version (#2238) 2021-10-06 12:08:28 -04:00
Roman Volosovskyi e77371d7d2
[pairing] Do not mark contact as added on unblocking 2021-10-06 14:48:28 +03:00
Roman Volosovskyi 4de912baba [pairing] Sync chat removing 2021-10-06 12:38:57 +01:00
andrey d90fe86a61 revert mentions for chat preview 2021-10-06 11:39:29 +02:00
Parvesh Monu c3ced09839
Storing emoji values for Custom Emoji Thumbnails for Community Channels (#2366) 2021-10-04 18:32:25 +05:30
Andrea Maria Piana 5e83d8e95e Add HasAddedUs field 2021-10-04 12:19:15 +02:00
Samuel Hawksby-Robinson 20b6f8d96e
Added currency filter to ramp (#2390) 2021-10-01 14:25:54 +01:00
Andrea Maria Piana 51493d61bd Resend on new contact 2021-09-30 13:02:41 +01:00
Samuel Hawksby-Robinson d9ea6a910e Tests and linting 2021-09-30 13:02:41 +01:00
Andrea Maria Piana 5c55ab5264 Make sure request is originating from us before marking it as processed
This commit fixes one source of flakyness in the tests, which was an
actual bug.

If 1 device is registering with a push notification server, if there's
another device with the same public key, both would mark themselves as
registered, while maybe only one has been actually registered.

To fix this, we keep track of the request ids we send (in memory for
now), and only mark it as registered if the request was originating on
this device.
2021-09-28 12:31:26 +01:00