Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing community messages when re-joining #11686

Closed
osmaczko opened this issue Jul 27, 2023 · 4 comments · Fixed by status-im/status-go#4621
Closed

Missing community messages when re-joining #11686

osmaczko opened this issue Jul 27, 2023 · 4 comments · Fixed by status-im/status-go#4621
Assignees
Labels
bug Something isn't working
Milestone

Comments

@osmaczko
Copy link
Contributor

osmaczko commented Jul 27, 2023

Community-level encryption:

  1. Create token-gated community - ✓
  2. Join with MemberA who satisfies the criteria - ✓
  3. Send message "X" to general channel - ✓
  4. MemberA should see the "X" message - ✓
  5. Change token permissions so that MemberA no longer satisfies the criteria - ✓
  6. MemberA should be kicked from the community - ✓
  7. Send message "Y" to general channel - ✓
  8. Change token permissions so that MemberA once again meets the criteria - ✓
  9. MemberA should be re-added to the community - X (user has to manually re-join) able to manually re-join
    10. MemberA should see both "X" and "Y" messages - X (only sees "X")
  10. Send message "Z" to general channel - ✓
  11. MemberA should see "X", "Y" and "Z" messages - X (only sees "X" and "Z")

Originally posted by @lukaszso in #11657 (comment)

I believe it happens also on non token-gated communities.

@igor-sirotin
Copy link
Contributor

Might be related: status-im/status-go#3869

@igor-sirotin
Copy link
Contributor

igor-sirotin commented Aug 10, 2023

The issue is reproduced in many different ways (at least I think it's the same issue).

In all cases application restart helps.
Though if there was a long pause (e.g. 1hr) messages are not shown even after app restart.

Not reproducible on mobile.

Prerequisites:

  1. Admin: Create a community
    • community history service: doesn't matter
    • request to join: doesn't matter
  2. Admin: Share community with User

1️⃣ Last messages of spectated communities

  1. Admin: Send a message X
  2. User: Spectate the community
  3. User: No message X visible ❌
  4. User: restart the app
  5. User: Message X visible ✅

2️⃣ Restart the app before spectate

  1. Admin: Send a message X
  2. User: Restart the app
  3. User: Spectate the community
  4. User: Message X visible ✅

3️⃣ Message in closed spectated community

  1. User: Spectate the community
  2. Admin: send message X
  3. User: message X visible
  4. User: Close the community
  5. Admin: send message Y
  6. User: Spectate community again
  7. User: no message Y visible ❌
  8. User: restart the app
  9. User: Message Y visible ✅

4️⃣ Leave and spectate community

  1. User: Send request to join
  2. Admin: Accept request to join
  3. Admin: send message X
  4. User: message X visible
  5. User: Leave the community
  6. Admin: send message Y
  7. User: Spectate community (or event join the community)
  8. User: no message Y visible ❌
  9. User: restart the app
  10. User: Message Y visible ✅

@igor-sirotin igor-sirotin moved this from Iteration Backlog to In Progress in Status Desktop/Mobile Board Aug 11, 2023
@jrainville jrainville modified the milestones: 0.14, 0.15 Aug 15, 2023
@jrainville jrainville moved this from In Progress to Next Iteration in Status Desktop/Mobile Board Aug 15, 2023
@igor-sirotin igor-sirotin moved this from Next Iteration to Iteration Backlog in Status Desktop/Mobile Board Aug 15, 2023
@jrainville jrainville removed the C3 label Aug 15, 2023
@igor-sirotin igor-sirotin moved this from Iteration Backlog to Next Iteration in Status Desktop/Mobile Board Aug 15, 2023
@jrainville jrainville moved this to Next Iteration in Status Desktop/Mobile Board Nov 23, 2023
@igor-sirotin igor-sirotin moved this from Next Iteration to Iteration Backlog in Status Desktop/Mobile Board Dec 11, 2023
@igor-sirotin igor-sirotin moved this from Iteration Backlog to In Progress in Status Desktop/Mobile Board Dec 13, 2023
@igor-sirotin igor-sirotin moved this from In Progress to Iteration Backlog in Status Desktop/Mobile Board Dec 19, 2023
@igor-sirotin
Copy link
Contributor

igor-sirotin commented Dec 25, 2023

  1. I wasn't able to reproduce any of cases from my comment above.
  2. I wasn't able to reproduce original issue as well.

But I faced a similar (but different) issue.

  1. Stage 1. Prerequisites:
    1. admin: enable testnet
    2. admin: Create a community:
      • no history service
      • no request to join
      • 10 STT to become a member
    3. user: enable testnet
    4. user: Aquire 20 STT
    5. admin: Share the community with user
    6. user: Auto-join the community
  2. Stage 2. Message X.
    1. admin: send message X to #general
    2. user: receives message X
  3. Stage 3. Message Y.
    3. admin: change permission to 30 STT
    5. user: auto-kicked from community
    - NOTE: message X is deleted from database for the user
    6. admin: send message Y
  4. Stage 3. Message Z.
    8. admin change permissions to 11 SNT
    9. user: re-join community
    10. user: no messages here ❌
    11. admin: send message Z
    12. user: receives message Z
    13. user: only has message Z (should be X, Y and Z) ❌

  • Application restart doesn't help.
  • X and Y messages disappear from the database after being auto-kicked

@mprakhov @osmaczko do you guys know if this is intended behaviour?

@igor-sirotin igor-sirotin moved this from Iteration Backlog to In Progress in Status Desktop/Mobile Board Dec 25, 2023
@osmaczko
Copy link
Contributor Author

osmaczko commented Jan 8, 2024

X and Y messages disappear from the database after being auto-kicked

This seems incorrect; I don't know the exact UI flows, but if a user is removed, they should become a spectator and still be able to read all previous conversations. Nevertheless, even if messages are removed, they should be retrievable upon rejoining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants