There were 2 issues:
1) We hard delete requests, that means that on retransmission they will
be recreated, the test has been changed to accommodate this behavior
2) We always used time.now when updating timestamp in notification,
sometimes time is the same so the notification is not updated, we
changed to use what essentially is a clock value
Filters were removed and recreated which resulted in a flaky test.
This was not needed as the filters didn't change, and they won't be
recreated if we reinstall the same filter.
This commit adds a test for out of order messages, which were only
implicitly tested.
It also deletes them after being processed, otherwise they would be
reproceessed each time a message was sent
This commit fixes 3 issues:
1) In some cases, the hash ratchet was not correctly found
2) Out of order messages were not processed correctly as the wrong error
was returned
3) Batched non datasync messages were not processed correctly
Fixes: #4170
Fixes https://github.com/status-im/status-desktop/issues/12558
When getting kicked out of a community, before we used to leave the community completely, but just keep the filters on.
That created a problem when reopening the app, because the community disappeared and could even create a problem in desktop where it tried to open the last opened community but it's no longer there.
The fix now is that when getting kicked out, we instead just remove ourselves from the community and set Joined to false, but we keep the community spectated.
Also check pin post permission a bit earlier for the sender, with
canPost() in sendPinMessage(), even though there is a later check down
the line in dispatchMessage().
Fixes#4138
Which specifies that if a user is not a community member & a
chat member, he can't post, react or pin messages in that chat.
Notes:
- also fix&cleanup associated failing tests.
- refactor Community.CanPost() to reflect the new requirement.
- grant code is not fully implemented and is to be removed later.
Fixes https://github.com/status-im/status-desktop/issues/11915