mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-25 09:22:22 +00:00
Don't notify group members & followers from new draft event
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
aeaf22a224
commit
8e7907ec9e
1 changed files with 3 additions and 3 deletions
|
@ -14,11 +14,11 @@ defmodule Mobilizon.Service.Workers.EventDelayedNotificationWorker do
|
||||||
@impl Oban.Worker
|
@impl Oban.Worker
|
||||||
def perform(%Job{args: %{"action" => "notify_of_new_event", "event_uuid" => event_uuid}}) do
|
def perform(%Job{args: %{"action" => "notify_of_new_event", "event_uuid" => event_uuid}}) do
|
||||||
case Events.get_event_by_uuid_with_preload(event_uuid) do
|
case Events.get_event_by_uuid_with_preload(event_uuid) do
|
||||||
%Event{} = event ->
|
%Event{draft: false} = event ->
|
||||||
Group.notify_of_new_event(event)
|
Group.notify_of_new_event(event)
|
||||||
|
|
||||||
nil ->
|
nil ->
|
||||||
# Event deleted inbetween, no worries, just ignore
|
# Event still a draft or event deleted inbetween, no worries, just ignore
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -44,7 +44,7 @@ defmodule Mobilizon.Service.Workers.EventDelayedNotificationWorker do
|
||||||
)
|
)
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
# Event deleted inbetween, no worries, just ignore
|
# Event still a draft or event deleted inbetween, no worries, just ignore
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue