status-go/services/ext
Jonathan Rainville a6285cc827
Fix chats reseting when a Sync signal comes for communities (#3539)
* fix(community): stop re-joining comm when receiving a sync community msg

Fixes an issue with chats being reset. Since joining a community resaves the chats with the synced default value, it resets the sate of the chats, losing the unread messages, the muted state and more.
The solution is to block the re-joining of the community. In the case of the sync, we catch that error and just continue on.

* fix(import): fix HandleImport not saving the chat

Doesn't change much, but it could have caused issues in the future, so since we might have modified the chat, we make sure to save them
Also adds a test

* fix tests
2023-05-29 13:57:05 -04:00
..
mailservers Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
README.md Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
api.go Fix chats reseting when a Sync signal comes for communities (#3539) 2023-05-29 13:57:05 -04:00
api_test.go Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
context.go Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
handler_mock.go Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
mailrequests.go remove nimbus 2021-05-21 07:22:58 +02:00
mailrequests_test.go remove nimbus 2021-05-21 07:22:58 +02:00
node_mock.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
requests.go Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
requests_test.go Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
rpc.go Split shhext into shhext and wakuext (#1803) 2020-01-20 21:56:06 +01:00
service.go Allow setting up wallet with new config 2023-05-19 13:23:21 +01:00
signal.go feat: accounts improvements applied 2023-05-25 19:46:47 +02:00

README.md

Whisper API Extension

API

shhext_getNewFilterMessages

Accepts the same input as shh_getFilterMessages.

Returns

Returns a list of whisper messages matching the specified filter. Filters out the messages already confirmed received by shhext_confirmMessagesProcessed

Deduplication is made using the whisper envelope content and topic only, so the same content received in different whisper envelopes will be deduplicated.

shhext_confirmMessagesProcessed

Confirms whisper messages received and processed on the client side. These messages won't appear anymore when shhext_getNewFilterMessages is called.

Parameters

Gets a list of whisper envelopes.

shhext_post

Accepts same input as shh_post.

Returns

DATA, 32 Bytes - the envelope hash

shhext_requestMessages

Sends a request for historic messages to a mail server.

Parameters
  1. Object - The message request object:
  • mailServerPeer:URL - Mail servers' enode addess
  • from:QUANTITY - (optional) Lower bound of time range as unix timestamp, default is 24 hours back from now
  • to:QUANTITY- (optional) Upper bound of time range as unix timestamp, default is now
  • topic:DATA, 4 Bytes - Regular whisper topic
  • symKeyID:DATA- ID of a symmetric key to authenticate to mail server, derived from mail server password
Returns

Boolean - returns true if the request was send, otherwise false.

Signals

Sends sent signal once per envelope.

{
  "type": "envelope.sent",
  "event": {
    "hash": "0xea0b93079ed32588628f1cabbbb5ed9e4d50b7571064c2962c3853972db67790"
  }
}

Sends expired signal if envelope dropped from whisper local queue before it was sent to any peer on the network.

{
  "type": "envelope.expired",
  "event": {
    "hash": "0x754f4c12dccb14886f791abfeb77ffb86330d03d5a4ba6f37a8c21281988b69e"
  }
}