-
Notifications
You must be signed in to change notification settings - Fork 19
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
Hide message text input bar if the user cannot send messages in a room #253
base: main
Are you sure you want to change the base?
Conversation
Screencast.from.2024-11-15.10-34-45.webmI will never give up, please review:) |
Untitled.video.-.Made.with.Clipchamp.mp4Here are some issues I found:
|
/ / My advice is to always check the behavior of the element.io for the correct api to use. Use two accounts, both in the same room. One mutes the other, you should already see the message text input bar hidden for the muted user. Hence there is no "can_user_send_message" checks in between. |
Done. |
@CodiumAI-Agent /review |
PR Reviewer Guide 🔍(Review updated until commit b700faa)Here are some key observations to aid the review process:
|
Nope, you need to also inspect the network using browser dev tool and understand matrix api.
|
Persistent review updated to latest commit b700faa |
@Demolemon11 Core requirements:
Implementation details:
Suggestions for improvement:
Code improvement suggestions:
|
this can be done in a future PR, too, if you want to keep this one simple/manageable. Multiple smaller PRs are preferred over one big PR.
Same comment as above.
I think this is the same thing as the first point. As I mentioned in one of my earlier comments, a subscription mechanism that asynchronously |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your name choices for functions and variables are quite inconsistent. You have all of the following:
- CheckUserPostPermission
- check_user_post_permission
- CanUserPost
- can_user_post
- no_send_permission_notice
- NO_POST_PERMISSION_NOTICE
- "user send permission"
There are too many different names here for what is all the same thing. In this case, let's follow what the Matrix SDK does. Specifically, they use the phrase "can user send message", so let's use variants of that phrase everywhere else, instead of all the different names/phrases that I listed above from your current code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the naming fixes, things are much better now. Just a few more minor comments.
issue231