mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 13:46:07 -04:00
Change: Change the way sessions are named to put the account first, then the social network.
This commit is contained in:
@@ -3,9 +3,11 @@ from sessions.mastodon import session
|
||||
class Session(session.Session):
|
||||
# disable version check so Mastodon.py won't throw exceptions.
|
||||
version_check_mode = "none"
|
||||
name = "GoToSocial"
|
||||
|
||||
def get_lists(self):
|
||||
""" Gets the lists that the user is subscribed to and stores them in the database. Returns None."""
|
||||
self.db["lists"] = []
|
||||
|
||||
def get_muted_users(self):
|
||||
self.db["muted_users"] = []
|
||||
|
@@ -23,6 +23,7 @@ MASTODON_VERSION = "4.0.1"
|
||||
|
||||
class Session(base.baseSession):
|
||||
version_check_mode = "created"
|
||||
name = "Mastodon"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Session, self).__init__(*args, **kwargs)
|
||||
@@ -52,7 +53,7 @@ class Session(base.baseSession):
|
||||
log.debug("Logged.")
|
||||
self.counter = 0
|
||||
except MastodonError:
|
||||
log.exception("The login attempt failed.")
|
||||
log.exception(f"The login attempt failed on instance {self.settings['mastodon']['instance']}.")
|
||||
self.logged = False
|
||||
else:
|
||||
self.logged = False
|
||||
@@ -241,7 +242,7 @@ class Session(base.baseSession):
|
||||
instance = self.settings["mastodon"]["instance"]
|
||||
instance = instance.replace("https://", "")
|
||||
user = self.settings["mastodon"]["user_name"]
|
||||
return "Mastodon: {}@{}".format(user, instance)
|
||||
return "{}@{} ({})".format(user, instance, self.name)
|
||||
|
||||
def start_streaming(self):
|
||||
if self.settings["general"]["disable_streaming"]:
|
||||
|
Reference in New Issue
Block a user