mirror of https://gitlab.com/bashrc2/epicyon
More robust retweet detection
parent
16cf56d87a
commit
77350a8e6a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue