2013-06-28 16:02:58 +02:00
|
|
|
import re
|
|
|
|
|
|
|
|
from django.db.models import F, Q
|
2013-07-29 23:03:31 +02:00
|
|
|
import zerver.models
|
2013-06-28 16:02:58 +02:00
|
|
|
|
|
|
|
# Match multi-word string between @** ** or match any one-word
|
|
|
|
# sequences after @
|
2013-07-12 20:26:09 +02:00
|
|
|
find_mentions = r'(?<![^\s\'\"\(,:<])@(?:\*\*([^\*]+)\*\*|(\w+))'
|
2013-06-28 16:02:58 +02:00
|
|
|
|
|
|
|
wildcards = ['all', 'everyone']
|
|
|
|
|
2013-10-09 20:48:05 +02:00
|
|
|
def user_mention_matches_wildcard(mention):
|
|
|
|
return mention in wildcards
|