diff options
-rw-r--r-- | Utilities/AccountManager.py | 5 | ||||
-rwxr-xr-x | main.py | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Utilities/AccountManager.py b/Utilities/AccountManager.py index daad76d..51d3dc3 100644 --- a/Utilities/AccountManager.py +++ b/Utilities/AccountManager.py @@ -104,4 +104,9 @@ class AccountManager: Mastodon(client_id = mapp, api_base_url = mbase, access_token = muser).toot(message) + def post_topic(self, topic): + msg = "Nouveau topic par {} : {}\n{}".format(topic.poster.name, + topic.title, topic.link()) + self.post(msg) + # End of file. @@ -56,8 +56,6 @@ if __name__ == "__main__": for topic in cache: print("[+] Publishing post for topic {}".format(topic.id)) - msg = "Nouveau topic par {} : {}\n{}".format(topic.poster.name, - topic.title, topic.link()) - mgr.post(msg) + mgr.post_topic(topic) # End of file. |