-
Notifications
You must be signed in to change notification settings - Fork 1k
Disable chat input for chats with a blocked user #13162
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
Disable chat input for chats with a blocked user #13162
Conversation
Jenkins BuildsClick to see older builds (6)
|
@@ -1051,7 +1050,7 @@ | |||
(assoc :show-input? true) | |||
|
|||
(not group-chat) | |||
(assoc :show-input? true))))) | |||
(assoc :show-input? (not (contains? blocked-users-set chat-id))))))) |
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.
this might be slow, if there are many blocked users, honestly I don't think its a big issue, I wouldn't implement it because it harms performance for 99,9999% of valid chats , I don't see any issues with that user can write to blocked user
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.
This should be fairly quick though, blocked-users-set
is a set, so it should be just constant time (O(1)), and not depending on set size
8c1b22e
to
dbdd4c7
Compare
Signed-off-by: Audrius Molis <masta@dr.com>
dbdd4c7
to
08da76c
Compare
87% of end-end tests have passed
Failed tests (9)Click to expand
Passed tests (62)Click to expand |
tested in nightly builds. No issues were found. |
fixes #13115
Summary
[comment]: # User can send messages to blocked contact so this commit disables chat input for chats with a blocked user.
Platforms
Areas that maybe impacted
1-1 chats
Functional
Non-functional
Steps to test
status: ready