Skip to content

Commit

Permalink
we need to provide the config to the announcement maker
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Aug 31, 2024
1 parent 59828ec commit 252ca8b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion voctopublish/api_client/bluesky_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def send_post(ticket, config):
LOG.info("post the release to bluesky")

try:
message = make_message(ticket, 280, 24)
message = make_message(ticket, config, 280, 24)
except EmptyAnnouncementMessage:
return

Expand Down
2 changes: 1 addition & 1 deletion voctopublish/api_client/mastodon_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def send_toot(ticket, config):
LOG.info("toot the release")

try:
message = make_message(ticket, 500)
message = make_message(ticket, config, 500)
except EmptyAnnouncementMessage:
return

Expand Down
2 changes: 1 addition & 1 deletion voctopublish/api_client/twitter_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def send_tweet(ticket, config):
LOG.info("tweeting the release")

try:
message = make_message(ticket, 280, 24)
message = make_message(ticket, config, 280, 24)
except EmptyAnnouncementMessage:
return

Expand Down
2 changes: 1 addition & 1 deletion voctopublish/api_client/webhook_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def send(ticket, config, voctoweb_filename, voctoweb_language, rclone):

def _get_json(ticket, config, voctoweb_filename, language, rclone):
try:
message = make_message(ticket)
message = make_message(ticket, config)
except EmptyAnnouncementMessage:
message = None

Expand Down
2 changes: 1 addition & 1 deletion voctopublish/tools/announcements.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class EmptyAnnouncementMessage(Exception):
pass


def make_message(ticket, max_length=None, override_url_length=None):
def make_message(ticket, config, max_length=None, override_url_length=None):
if max_length is None:
# if max_length is not set, set it to something very big here.
# saves us a bunch of isinstance() calls below
Expand Down

0 comments on commit 252ca8b

Please sign in to comment.