From 2e90bb18a9e0217cda2d4ff53d3a20dcd1d3020a Mon Sep 17 00:00:00 2001 From: muskit <15199219+muskit@users.noreply.github.com> Date: Fri, 18 Aug 2023 22:34:46 -0700 Subject: [PATCH] fix handling of TalentTweet.announce_text.rtm_msg --- src/talenttweet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/talenttweet.py b/src/talenttweet.py index c9cb097..fc810a4 100644 --- a/src/talenttweet.py +++ b/src/talenttweet.py @@ -193,7 +193,9 @@ class TalentTweet: mention_usernames = [f'@/{util.get_username_with_company(x)}' for x in print_mention_ids] def rtm_msg(TEMPLATE: str, rtm_author_username: str): - if self.rt_author_id != -1: # rtm tweet is from talent; rtm should be everyone + nonlocal ret + if (self.rt_author_id is not None and self.rt_author_id != -1) \ + or (self.quote_tweeted is not None and self.quote_tweeted != -1): # rtm tweet is from talent; rtm should be everyone rtm_names = [f'@/{util.get_username_with_company(x)}' for x in self.rt_mentions] between = f' from {rtm_author_username} ' ret += TEMPLATE.format(author_username, between, ", ".join(rtm_names))