Skip to content

Commit

Permalink
make wire notifications on correction configurable (#660)
Browse files Browse the repository at this point in the history
* make wire notifications on correction configurable

CPCN-468

* fix black
  • Loading branch information
petrjasek authored Nov 16, 2023
1 parent 6b118c0 commit c1b9470
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion newsroom/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ def push():
elif item.get("type") == "text":
orig = superdesk.get_resource_service("items").find_one(req=None, _id=item["guid"])
item["_id"] = publish_item(item, orig)
notify_new_wire_item.delay(item["_id"], check_topics=orig is None)
notify_new_wire_item.delay(
item["_id"], check_topics=orig is None or app.config["WIRE_NOTIFICATIONS_ON_CORRECTIONS"]
)
elif item["type"] == "planning_featured":
publish_planning_featured(item)
else:
Expand Down
9 changes: 8 additions & 1 deletion newsroom/web/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,15 @@

#:
#: If `True` it will show multi day events only on starting day,
# when `False` those will be visible on every day.
#: when `False` those will be visible on every day.
#:
#: .. versionadded: 2.5.0
#:
AGENDA_SHOW_MULTIDAY_ON_START_ONLY = True

#: Send email notifications for corrections of wire items
#:
#:
#: .. versionadded: 2.5.0
#:
WIRE_NOTIFICATIONS_ON_CORRECTIONS = False

0 comments on commit c1b9470

Please sign in to comment.