|
|
@ -79,7 +79,7 @@ class PublicRelations(Bureau):
|
|
|
|
|
|
|
|
|
|
|
|
def get_tweet_id(self, tweet_hash):
|
|
|
|
def get_tweet_id(self, tweet_hash):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
take a short code and look up the tweet id
|
|
|
|
take a short code and look up the tweet/toot id
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
with self.dbenv.begin(db=self.tweetdb) as txn:
|
|
|
|
with self.dbenv.begin(db=self.tweetdb) as txn:
|
|
|
|
tweetid = txn.get(tweet_hash.encode())
|
|
|
|
tweetid = txn.get(tweet_hash.encode())
|
|
|
@ -275,7 +275,7 @@ class PublicRelations(Bureau):
|
|
|
|
Boost a toot (or whatever kind of Fediverse content)
|
|
|
|
Boost a toot (or whatever kind of Fediverse content)
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
toot_id = self.get_toot_id(shortcode)
|
|
|
|
toot_id = self.get_tweet_id(shortcode)
|
|
|
|
self.masto.status_reblog(toot_id)
|
|
|
|
self.masto.status_reblog(toot_id)
|
|
|
|
|
|
|
|
|
|
|
|
@add_command("mafv", "Favorite a toot")
|
|
|
|
@add_command("mafv", "Favorite a toot")
|
|
|
@ -284,7 +284,7 @@ class PublicRelations(Bureau):
|
|
|
|
favorite a toot (or other kind of Fediverse content)
|
|
|
|
favorite a toot (or other kind of Fediverse content)
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
toot_id = self.get_toot_id(shortcode)
|
|
|
|
toot_id = self.get_tweet_id(shortcode)
|
|
|
|
self.masto.status_favorite(toot_id)
|
|
|
|
self.masto.status_favorite(toot_id)
|
|
|
|
|
|
|
|
|
|
|
|
@add_command("marp", "Reply to a toot")
|
|
|
|
@add_command("marp", "Reply to a toot")
|
|
|
@ -293,7 +293,7 @@ class PublicRelations(Bureau):
|
|
|
|
Reply to a toot with the image under the document camera.
|
|
|
|
Reply to a toot with the image under the document camera.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
toot_id = self.get_toot_id(shortcode)
|
|
|
|
toot_id = self.get_tweet_id(shortcode)
|
|
|
|
self.toot_pic(reply_to=toot_id)
|
|
|
|
self.toot_pic(reply_to=toot_id)
|
|
|
|
|
|
|
|
|
|
|
|
@add_command("toot", "Post a Document Camera Image to the Fediverse")
|
|
|
|
@add_command("toot", "Post a Document Camera Image to the Fediverse")
|
|
|
@ -314,7 +314,7 @@ class PublicRelations(Bureau):
|
|
|
|
various social and public relations management.
|
|
|
|
various social and public relations management.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
toot_id = self.get_toot_id(shortcode)
|
|
|
|
toot_id = self.get_tweet_id(shortcode)
|
|
|
|
t = self.masto.status(toot_id)
|
|
|
|
t = self.masto.status(toot_id)
|
|
|
|
|
|
|
|
|
|
|
|
prn = self._get_small_printer()
|
|
|
|
prn = self._get_small_printer()
|
|
|
|