Mentions are detected even if username's capitalization is incorrect

This commit is contained in:
Manuel Cortez 2014-12-07 13:24:56 -06:00
parent 8e92d97260
commit 5e3bcfc82e

View File

@ -51,7 +51,7 @@ class streamer(TwythonStreamer):
wx.PostEvent(self.parent.search_buffer("buffer", "favs"), tweet_event) wx.PostEvent(self.parent.search_buffer("buffer", "favs"), tweet_event)
def check_mentions(self, data): def check_mentions(self, data):
if "@%s" % (self.db.settings["user_name"]) in data["text"]: if "@%s" % (self.db.settings["user_name"].lower()) in data["text"].lower():
tweet_event = event.event(event.EVT_OBJECT, 1) tweet_event = event.event(event.EVT_OBJECT, 1)
tweet_event.SetItem(data) tweet_event.SetItem(data)
text = _(u"One mention from %s ") % (data["user"]["name"]) text = _(u"One mention from %s ") % (data["user"]["name"])