Create valid account buffers even when session cannot login to the network (works for ignored sessions)

This commit is contained in:
2022-11-16 11:01:52 -06:00
parent 7c80c9d842
commit fefd88b71c
5 changed files with 11 additions and 11 deletions

View File

@@ -175,5 +175,5 @@ class Session(base.baseSession):
def get_name(self):
instance = self.settings["mastodon"]["instance"]
instance = instance.replace("https://", "")
user = self.db["user_name"]
user = self.settings["mastodon"]["user_name"]
return "Mastodon: {}@{}".format(user, instance)

View File

@@ -674,4 +674,7 @@ class Session(base.baseSession):
pub.sendMessage("sent-dm", data=item, session_name=self.get_name())
def get_name(self):
return "Twitter: {}".format(self.db["user_name"])
if self.logged:
return "Twitter: {}".format(self.db["user_name"])
else:
return "Twitter: {}".format(self.settings["twitter"]["user_name"])