diff --git a/couchpotato/core/notifications/twitter/__init__.py b/couchpotato/core/notifications/twitter/__init__.py index 6bdd5348..00569e62 100644 --- a/couchpotato/core/notifications/twitter/__init__.py +++ b/couchpotato/core/notifications/twitter/__init__.py @@ -27,6 +27,10 @@ config = [{ 'name': 'access_token_secret', 'advanced': True, }, + { + 'name': 'mention', + 'description': 'Add a mention to this user to the tweet.', + }, ], } ], diff --git a/couchpotato/core/notifications/twitter/main.py b/couchpotato/core/notifications/twitter/main.py index f3891956..dae428e9 100644 --- a/couchpotato/core/notifications/twitter/main.py +++ b/couchpotato/core/notifications/twitter/main.py @@ -36,6 +36,10 @@ class Twitter(Notification): api = Api(self.consumer_key, self.consumer_secret, self.conf('access_token_key'), self.conf('access_token_secret')) + mention = self.conf('mention') + if mention: + message = '%s @%s' % (message, mention.lstrip('@')) + try: api.PostUpdate('[%s] %s' % (self.default_title, message)) except Exception, e: