Fix is_private check in mentions array handling.

This commit is contained in:
Rapptz 2015-11-19 22:20:07 -05:00
parent 692a6a3bc6
commit e88c194e9a

View File

@ -99,7 +99,10 @@ class Message(object):
def _handle_mentions(self, mentions):
self.mentions = []
if self.channel is not None and not self.channel.is_private:
if getattr(self.channel, 'is_private', True):
return
if self.channel is not None:
for mention in mentions:
id_search = mention.get('id')
member = utils.find(lambda m: m.id == id_search, self.server.members)