|
|
|
|
@ -7,7 +7,7 @@ class MentionsServer |
|
|
|
|
constructor: (message) -> |
|
|
|
|
# If message starts with /me, replace it for text formatting |
|
|
|
|
mentions = [] |
|
|
|
|
message.msg.replace /(?:^|\s|\n)(?:@)([A-Za-z0-9-_.\u00C0-\u017F]+)/g, (match, mention) -> |
|
|
|
|
message.msg.replace /(?:^|\s|\n)(?:@)([A-Za-z0-9-_.\u00C0-\u017F\u4e00-\u9fa5]+)/g, (match, mention) -> |
|
|
|
|
mentions.push mention |
|
|
|
|
if mentions.length isnt 0 |
|
|
|
|
mentions = _.unique mentions |
|
|
|
|
@ -25,7 +25,7 @@ class MentionsServer |
|
|
|
|
message.mentions = verifiedMentions |
|
|
|
|
|
|
|
|
|
channels = [] |
|
|
|
|
message.msg.replace /(?:^|\s|\n)(?:#)([A-Za-z0-9-_.\u00C0-\u017F]+)/g, (match, mention) -> |
|
|
|
|
message.msg.replace /(?:^|\s|\n)(?:#)([A-Za-z0-9-_.\u00C0-\u017F\u4e00-\u9fa5]+)/g, (match, mention) -> |
|
|
|
|
channels.push mention |
|
|
|
|
|
|
|
|
|
if channels.length isnt 0 |
|
|
|
|
|