Skip to content

Commit

Permalink
Bug 1226559 - Fix twitter @mention pings. r=clokep
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 0be7305cb206c2d32203f301d4778e7239534e5a
extra : amend_source : bbf7f36c2f336000cf950aaf995548222f5fc775
  • Loading branch information
aleth committed Nov 20, 2015
1 parent 46491b2 commit 7cfdc0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chat/protocols/twitter/twitter.js
Expand Up @@ -351,7 +351,9 @@ Conversation.prototype = {
flags._iconURL = aTweet.user.profile_image_url;
if (aTweet.delayed)
flags.delayed = true;
if (text.includes("@" + this.nick))
if (aTweet.entities && aTweet.entities.user_mentions &&
Array.isArray(aTweet.entities.user_mentions) &&
aTweet.entities.user_mentions.some(mention => mention.screen_name == this.nick))
flags.containsNick = true;

(new Tweet(aTweet, name, text, flags)).conversation = this;
Expand Down

0 comments on commit 7cfdc0f

Please sign in to comment.