mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 04:48:09 -06:00
Added some fixes
This commit is contained in:
parent
b7497791b4
commit
8d2fb59ba8
@ -98,7 +98,7 @@ class Handler(object):
|
||||
users.insert(0, item.reblog.account.acct)
|
||||
else:
|
||||
users = [user.acct for user in item.mentions if user.id != buffer.session.db["user_id"]]
|
||||
if item.account.acct not in users and item.account.id != buffer.session.db["user_id"]:
|
||||
if item.account.acct not in users:
|
||||
users.insert(0, item.account.acct)
|
||||
u = userActions.userActions(buffer.session, users)
|
||||
|
||||
|
@ -25,9 +25,8 @@ class BasicUserSelector(object):
|
||||
|
||||
def search_user(self, user):
|
||||
try:
|
||||
users = self.session.api.account_search(user)
|
||||
if len(users) > 0:
|
||||
return users[0]
|
||||
user = self.session.api.account_lookup(user)
|
||||
return user
|
||||
except MastodonError:
|
||||
log.exception("Error searching for user %s.".format(user))
|
||||
|
||||
|
@ -18,5 +18,5 @@ class StreamListener(mastodon.StreamListener):
|
||||
def on_notification(self, notification):
|
||||
pub.sendMessage("mastodon.notification_received", notification=notification, session_name=self.session_name)
|
||||
|
||||
def on_unknown_event(self, event):
|
||||
log.error("Unknown event: {}".format(event))
|
||||
def on_unknown_event(self, event, payload):
|
||||
log.error("Unknown event: {} with payload as {}".format(event, payload))
|
||||
|
Loading…
Reference in New Issue
Block a user