Fixed websocket message mention detection

This commit is contained in:
RogueException
2016-10-04 13:37:40 -03:00
parent 857255abde
commit c67bd04c5a
2 changed files with 7 additions and 3 deletions

View File

@@ -96,10 +96,11 @@ namespace Discord.WebSocket
if (model.Content.IsSpecified)
{
var text = model.Content.Value;
var guild = (Channel as SocketGuildChannel)?.Guild;
_mentionedUsers = MentionsHelper.GetUserMentions(text, null, mentions);
_mentionedChannelIds = MentionsHelper.GetChannelMentions(text, null);
_mentionedRoles = MentionsHelper.GetRoleMentions<RestRole>(text, null);
_mentionedUsers = MentionsHelper.GetUserMentions(text, Channel, mentions);
_mentionedChannelIds = MentionsHelper.GetChannelMentions(text, guild);
_mentionedRoles = MentionsHelper.GetRoleMentions<RestRole>(text, guild);
model.Content = text;
}
}