Open Demolemon11 opened 1 week ago
Screencast from 2024-11-15 10-34-45.webm
I will never give up, please review:)
https://github.com/user-attachments/assets/cc8531eb-d67e-4773-a288-f8c3fa40a4c6
Here 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.
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
Here are some key observations to aid the review process:
**๐ซ Ticket compliance analysis โ ** **[231](https://github.com/project-robius/robrix/issues/231) - Fully compliant** Fully compliant requirements: - Hide the message input bar if the user does not have permission to send messages in a room. - Display a notice informing the user that they cannot send messages if they lack permissions. - Check permission status every time the user opens the room. - Subscribe to room state changes to update permission status dynamically. |
โฑ๏ธ Estimated effort to review: 3 ๐ต๐ต๐ตโชโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก Recommended focus areas for review Code Clarity The implementation of permission checks and UI updates could be refactored for better clarity and maintainability. |
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.
Nope, you need to also inspect the network using browser dev tool and understand matrix api.
check_user_permission
function from the process_timeline_updates functioncan_send_message
async function when entering the room. Nothing to do with timeline.@Demolemon11
Core requirements:
Implementation details:
Suggestions for improvement:
Code improvement suggestions:
Suggestions for improvement:
- โ Lacks a subscription mechanism for permission changes
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.
- โ Lacks unsubscribe logic when leaving the room
Same comment as above.
- โ Only checks permissions once when opening the room, without periodic checks
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 await
s updates to a user's power levels is much better than periodically checking it from the main UI thread, since updates to user power levels are very infrequent.
The Permission banner based subscription of the power level change works.
issue231