mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
mention: Allow silent mentioning system user groups.
Previously, we do not allow mentioning system user groups at all. Now we want to use silent mention syntax for system groups in the message sent when updating the posting permission for a stream, so it is important to allowing silent mentioning system groups at least. And there is no problem in allowing silent mentions of system groups for all users. We do not allow mentioning system groups as can_mention_group for them is set to "Nobody" group.
This commit is contained in:
@@ -51,6 +51,7 @@ from zerver.lib.mention import (
|
||||
FullNameInfo,
|
||||
MentionBackend,
|
||||
MentionData,
|
||||
get_user_group_mention_display_name,
|
||||
)
|
||||
from zerver.lib.outgoing_http import OutgoingSession
|
||||
from zerver.lib.subdomains import is_static_or_current_realm_url
|
||||
@@ -1989,7 +1990,7 @@ class UserGroupMentionPattern(CompiledInlineProcessor):
|
||||
|
||||
if not silent:
|
||||
self.zmd.zulip_rendering_result.mentions_user_group_ids.add(user_group.id)
|
||||
name = user_group.name
|
||||
name = get_user_group_mention_display_name(user_group)
|
||||
user_group_id = str(user_group.id)
|
||||
else:
|
||||
# Don't highlight @-mentions that don't refer to a valid user
|
||||
|
||||
Reference in New Issue
Block a user