mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-23 11:48:07 -06:00
Mentions are detected even if username's capitalization is incorrect
This commit is contained in:
parent
8e92d97260
commit
5e3bcfc82e
@ -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"])
|
||||||
|
Loading…
Reference in New Issue
Block a user