don't allow mentioning non-member contacts in public chat (#13227)

This commit is contained in:
Parvesh Monu 2022-03-30 00:25:46 +05:30 committed by GitHub
parent 99c35da72a
commit d086b86fd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -247,7 +247,10 @@
(merge mentionable-users
(mentionable-contacts-from-identites all-contacts public-key (keys community-members)))
:else (merge mentionable-users mentionable-contacts))))
(= chat-type constants/public-chat-type)
(merge mentionable-users (select-keys mentionable-contacts (keys mentionable-users)))
:else mentionable-users)))
(def ending-chars "[\\s\\.,;:]")
(def ending-chars-regex (re-pattern ending-chars))