From: b3yond Date: Thu, 8 Dec 2016 09:47:13 +0000 (+0100) Subject: enabled tweet chains. see issue #163 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6a90f5a275e419ff5bd7c02a8fde4d7901771e61;p=rainbowstream.git enabled tweet chains. see issue #163 If the user wants to reply themself, their @handle is not included in the tweet string. --- 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)