From 6a90f5a275e419ff5bd7c02a8fde4d7901771e61 Mon Sep 17 00:00:00 2001 From: b3yond Date: Thu, 8 Dec 2016 10:47:13 +0100 Subject: [PATCH] enabled tweet chains. see issue #163 If the user wants to reply themself, their @handle is not included in the tweet string. --- rainbowstream/rainbow.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 1b5ee1d..024e51b 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -618,7 +618,12 @@ def reply(): tid = c['tweet_dict'][id] user = t.statuses.show(id=tid)['user']['screen_name'] status = ' '.join(g['stuff'].split()[1:]) - status = '@' + user + ' ' + str2u(status) + # don't include own username for tweet chains + # for details see issue https://github.com/DTVD/rainbowstream/issues/163 + if user == g['original_name']: + status = str2u(status) + else: + status = '@' + user + ' ' + str2u(status) t.statuses.update(status=status, in_reply_to_status_id=tid) -- 2.25.1