More robust retweet detection

merge-requests/30/head
Bob Mottram 2021-03-02 14:09:51 +00:00
parent 16cf56d87a
commit 77350a8e6a
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ def speakerReplaceLinks(sayText: str, translate: {},
prevWord = '' prevWord = ''
for word in wordsList: for word in wordsList:
# replace mentions, but not re-tweets # replace mentions, but not re-tweets
if word.startswith('@') and prevWord != 'RT': if word.startswith('@') and not prevWord.endswith('RT'):
replacements[word] = \ replacements[word] = \
translate['mentioning'] + ' ' + word[1:] + ',' translate['mentioning'] + ' ' + word[1:] + ','
prevWord = word prevWord = word