Commit Graph

141 Commits

Author SHA1 Message Date
Boris Melnik 3e65e36fa6
feat: Add mute category methods (#2736) 2022-07-06 19:16:19 +03:00
Richard Ramos 0322ac497b
feat: contact verification request (#2586)
fix: add verification request to response

fix: code review

add missing functions and simplify timestamp usage

fix: sync verification requests

feat: add endpoint to fetch all received verification requests

feat: add signal when trusting verification request

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2022-07-05 15:49:44 -04:00
Michal Iskierko 72d2a97449 feat: unban user in community
Issue #2724
2022-07-04 09:02:33 +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
Andrea Maria Piana 961526556b
Accept/Dismiss LastestContactRequestForContact endpoint (#2702) 2022-06-17 12:20:43 -04:00
Pascal Precht f3af6aa4dc feat: introduce `AddBookmark` and `RemoveBookmark` APIs to messenger
These APIs are being introduced to address #2706 and #2704, provided
that clients will move to using these APIs instead of the currently
provided equivalent APIs in the browser service.

The `bookmarks` table is being extended with a `deleted_at` field which
can later be used for garbage collection, as "removing" a bookmark is
merely soft deletion and doesn't actually remove the data from the
database.

In addition to those APIs adding and soft deleting bookmark entries,
they also automatically perform a sync operation to ensure that
bookmarks are synced in real-time (#2704).

Closes #2706, #2704
2022-06-17 12:29:03 +02: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
Richard Ramos c3b0582cc9
feat: fetch curated communities from smart contract on optimism (#2685) 2022-06-02 08:17:52 -04:00
Andrea Maria Piana 1bfde4c4cc Initial support for mutual contact requests 2022-05-31 09:12:36 +01: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
Richard Ramos fe50f12ac9 fix: pubkey marshalling 2022-04-25 17:50:35 +04:00
Sale Djenic 10d0133974 fix: set only blocked flag to blocked contact for desktop app 2022-04-12 09:42:43 +02:00
Pascal Precht 7032fc9dcc Introduce community history archive routine
This introduces logic needed to:

- Create WakuMessageArchives and and indices from store waku messages
- History archive torrent data to disk and create .torrent file from
  that
- Seed and unseed history archive torrents as necessary
- Starting/stopping the torrent client
- Enabling/disabling community history support for individual components
  and starting/stopping the routine intervals accordingly

This does not yet handle magnet links (#2568)

Closes #2567
2022-04-06 13:00:33 +02: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
Pascal Precht bf8e71cfa9 Introduce `CommunitySettings` to store community related settings
These are used to store settings for individual communities a
user is part of, either as member or as owner.
This included whether or not the community history archive protocol
is enabled.

This adds a new `CommunitySettings` type and adds
a migration script that introduces a new `communities_settings`
table.

It also extends the `MessengerResponse` type to include
`CommunitySettings` which are honored when communities are being
added, edited, joined or left.

Lastly, this adds a new RPC API to retreive the settings.

Closes #2564
2022-03-22 12:33:40 +01: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
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
Richard Ramos 41d523f205 fix: code review 2022-03-03 15:37:07 -04:00
Richard Ramos 1bffd2e64d feat: unified chat API pt. 1 2022-03-03 15:37:07 -04:00
jo-mut 7d956bef94 resolved conflicts 2022-02-24 23:11:36 +03:00
Richard Ramos 353767aee6 feat: wakuext_imageServerUrl 2022-02-21 17:22:28 -04:00
frank 4cc53630d5 Sync bookmarks 2022-02-17 12:40:33 +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
Richard Ramos 98784b752a
feat: desktop mailserver cycle (#2481) 2022-01-12 12:02:01 -04:00
Parvesh Monu 83c3849899
Decline pending group invites from user, when user is blocked (#2455) 2021-12-06 18:14:40 +05:30
Michele Balistreri 0867458f16
Sync activity center (#2443)
sync activity center
2021-12-02 17:23:02 +03:00
Andrea Maria Piana ded81b7a51 Reject contact request endpoint 2021-11-23 14:11:43 +01:00
Richard Ramos d32f0467ae
feat: Add DiscV5 to Waku2 (#2434)
* feat: Add DiscV5 to Waku2
* fix: null verification for discV5
2021-11-22 09:40:14 -04:00
Andrea Maria Piana 272342fb6b Revert "Revert "Correctly process confirmations""
This reverts commit b4c4cf6241.
2021-11-22 11:18:09 +00:00
Andrea Maria Piana b4c4cf6241
Revert "Correctly process confirmations"
This reverts commit 1b9bc4450c.
2021-11-18 17:19:41 +00:00
Volodymyr Kozieiev 1b9bc4450c Correctly process confirmations 2021-11-17 09:28:09 +00:00
Pascal Precht df30c06163 feat: add API to mark activity center messages as unread 2021-11-16 12:14:32 +01:00
Andrea Maria Piana 6724cf4c75 Block contact endpoint 2021-11-15 18:53:35 +00:00
Andrea Maria Piana 1cc7546e67 Create contact if not in contacts when setting nickname 2021-11-15 18:53:35 +00:00
Andrea Maria Piana f04e5c741c unblock contact endpoint 2021-11-15 18:53:35 +00:00
Andrea Maria Piana a7b0c6c933 Backup removed & added by them contacts 2021-11-15 18:53:35 +00:00
Andrea Maria Piana 301325a22e Add backing up of contacts
We periodically check whether we should backup contacts through waku.

Currently it's not tied to any event, it will only schedule a backup on
a tick, or through the provided API endpoint.
2021-11-15 18:53:35 +00:00
Anthony Laibe c95c29bba5 feat: Push messages to telemetry server when receiving messages 2021-11-10 09:34:14 +01:00
Richard Ramos 7440c184c0
feat: add batch information and request ID in history requests (#2397) 2021-11-09 16:16:19 -05:00
saledjenic dbac362bc7
Added api points for fetching message details and message reactions (#2423)
by message id
2021-11-05 09:48:20 -04:00
Andrea Maria Piana 75aebd94ab Republish image on change of visibility settings 2021-10-08 14:36:30 +01:00
Richard Ramos 0fc8c036b1 fix: enable bandwidth stats depending on node config setting 2021-09-29 13:45:12 -04:00
Richard Ramos 3b05d379bd
feat: add signals that are emitted before/after history messages are requested (#2378)
* fix: sqlite variable limit

* feat: add signal for history messages
2021-09-28 14:41:35 -04:00
RichΛrd 7d148272e1 feat: functions to add peers and dial (#2345) 2021-09-27 09:04:28 -04:00
Richard Ramos 0575030825 feat: adding peers, fix peer count and fix format of peer stats signal 2021-09-27 09:04:28 -04:00
Andrea Maria Piana 3daba8c247 Shorten loop on waiting for community 2021-09-24 10:12:42 +01:00
andrey 59eeed9436 chats list performance 2021-09-20 10:51:18 +02:00
Michele Balistreri fb218761d9
add MarkAllReadInCommunity (#2364)
add MarkAllReadInCommunity
2021-09-20 09:33:36 +03:00