Skip to content

Commit

Permalink
Refs FedStoa#108 - Configuration UI for conditional posting by faves
Browse files Browse the repository at this point in the history
  • Loading branch information
xurizaemon committed Mar 11, 2019
1 parent f38b846 commit 1d72629
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions moa/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class SettingsForm(FlaskForm):
enabled = BooleanField('Bridging Enabled?')
conditional_posting = BooleanField('Conditionally cross-post with hashtags #nt and #nm?')
conditional_posting_faves = BooleanField('Conditionally cross-post by marking your posts as faves?')

post_to_twitter = BooleanField('Post Public toots to Twitter?')
post_private_to_twitter = BooleanField('Post Private toots to Twitter?')
Expand Down
1 change: 1 addition & 0 deletions moa/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class TSettings(Base):
id = Column(Integer, primary_key=True)
bridge = relationship('Bridge', backref='t_settings', lazy='dynamic')
conditional_posting = Column(Boolean, nullable=False, default=False)
conditional_posting_faves = Column(Boolean, nullable=False, default=False)

# Masto -> Twitter
post_to_twitter = Column(Boolean, nullable=False, default=True) # This means post public toots
Expand Down
1 change: 1 addition & 0 deletions templates/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<hr>
<li>{{ form.enabled(checked=g.bridge.enabled) }}{{ form.enabled.label }}</li>
<li>{{ form.conditional_posting }}{{ form.conditional_posting.label }}</li>
<li>{{ form.conditional_posting_faves }}{{ form.conditional_posting_faves.label }}</li>
{% endif %}

{% if g.bridge.twitter_oauth_token and g.bridge.mastodon_access_code %}
Expand Down

0 comments on commit 1d72629

Please sign in to comment.