status-go/cmd/ping-community
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
..
.gitignore Add ping community script 2021-11-16 15:36:55 +00:00
README.md Add ping community script 2021-11-16 15:36:55 +00:00
flags.go Add ping community script 2021-11-16 15:36:55 +00:00
main.go Fix chats reseting when a Sync signal comes for communities (#3539) 2023-05-29 13:57:05 -04:00
signing_phrase.go Add ping community script 2021-11-16 15:36:55 +00:00

README.md

Ping community

This script publishes a post every 2 seconds on the given community/chat-id, using the seed phrase provided.

How to build

You must have go installed. Then you can run, from cmd/ping-community

go build

which should create a ping-community executable

How to run

./ping-community --seed-phrase "your seed phrase" --community-id "community-id" --chat-id "chat-id"

The parameters are:

community-id: the ID of the community chat-id: the ID of the chat we want to post on