diff --git a/pykeg/contrib/twitter/forms.py b/pykeg/contrib/twitter/forms.py index af2c8795f..719f1781c 100644 --- a/pykeg/contrib/twitter/forms.py +++ b/pykeg/contrib/twitter/forms.py @@ -33,6 +33,8 @@ class SiteSettingsForm(forms.Form): help_text='Tweet when a keg is started or ended.') tweet_session_events = forms.BooleanField(initial=True, required=False, help_text='Tweet when a new session is started.') + tweet_session_joined_events = forms.BooleanField(initial=False, required=False, + help_text='Tweet someone joins a session.') tweet_drink_events = forms.BooleanField( initial=False, required=False, diff --git a/pykeg/contrib/twitter/plugin.py b/pykeg/contrib/twitter/plugin.py index 8ada0c8c0..1400f8074 100644 --- a/pykeg/contrib/twitter/plugin.py +++ b/pykeg/contrib/twitter/plugin.py @@ -196,7 +196,7 @@ def _issue_system_tweet(self, event, settings, site_profile): template = settings.get('session_started_template') elif kind == event.SESSION_JOINED: - if not settings.get('tweet_session_events'): + if not settings.get('tweet_session_joined_events'): self.logger.info( 'Skipping system tweet for session join event %s: disabled by settings.' % event.id) diff --git a/pykeg/contrib/twitter/plugin_test.py b/pykeg/contrib/twitter/plugin_test.py index a5c2e8b26..2e1ce6e98 100644 --- a/pykeg/contrib/twitter/plugin_test.py +++ b/pykeg/contrib/twitter/plugin_test.py @@ -53,6 +53,7 @@ def test_get_site_twitter_settings_form(self): expected = { 'tweet_keg_events': True, 'tweet_session_events': True, + 'tweet_session_joined_events': False, 'tweet_drink_events': False, 'include_guests': True, 'include_pictures': False,