status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
298 stars 79 forks source link

Input can show wrong token needed until a restart when the permission is updated twice #14222

Open jrainville opened 7 months ago

jrainville commented 7 months ago

Bug Report

Description

This was found while adding the permissions to the Status community.

Iuri started by adding a permission to all channels saying that $BRIDGE can view/post.

Then, he removed that one and set the bridge as admin.

After that, he put instead a view only on certain channels (private-announcements in this case).

Jacques was the one testing as a normal member, and he could see this weird case where the chat input was saying that he needs $Bridge to post in this. See screenshot: image

After a restart, the state was ok: image

What I think happened is that the channel still "remembered" when the channel had a view/post permission that needed $BRIDGE. So there was some sort of signal that was missed.

Steps to reproduce

  1. Have a community with one owner and one normal member
  2. Mint an NFT
  3. Set a permission to all channels for view/post needing that NFT
  4. See that the member cannot see nor post in the channels
  5. Remove the permission
  6. Add a permission where having that NFT makes you admin
  7. Add a permission to view only on one of the channels
  8. See that the member can now see in the specific channel, they cannot post, but the message in the input is wrong

*Disclaimer: I'm not sure if all the steps above are necessary, but that's what Iuri did. He technically also added a permission to all channels that said that $STATUSCC (token Jacques had) can view/post. I don't think that's a necessary step, but saying here just in case.

Expected behavior

Member can see the right message in the input about read only

Actual behavior

Member could still see a message about the NFT even if it was no longer the case. Restart fixed it

Additional Information

jrainville commented 2 months ago

This might be fixed. Moving to next milestone so it can be tested later