diff --git a/realtime/lib/realtime/application.ex b/realtime/lib/realtime/application.ex index a193f5f7..e43a32f4 100644 --- a/realtime/lib/realtime/application.ex +++ b/realtime/lib/realtime/application.ex @@ -12,28 +12,29 @@ defmodule Realtime.Application do # while named processes (like PubSub.Supervisor) survive, causing conflicts. {:ok, _} = Application.ensure_all_started(:postgrex) - children = [ - # Database repository for API key lookups - Realtime.Repo, + children = + [ + # Database repository for API key lookups + Realtime.Repo, - # Redis connection pool for rate limiting and distributed state - Realtime.Redis, + # Redis connection pool for rate limiting and distributed state + Realtime.Redis, - # Phoenix PubSub for internal message broadcasting - {Phoenix.PubSub, name: Realtime.PubSub}, + # Phoenix PubSub for internal message broadcasting + {Phoenix.PubSub, name: Realtime.PubSub}, - # Presence tracker for org-level collaboration (who's online / viewing what) - RealtimeWeb.Presence, + # Presence tracker for org-level collaboration (who's online / viewing what) + RealtimeWeb.Presence, - # Phoenix Endpoint (WebSocket server) - RealtimeWeb.Endpoint, + # Phoenix Endpoint (WebSocket server) + RealtimeWeb.Endpoint, - # Connection tracker - {Realtime.Connections, []}, + # Connection tracker + {Realtime.Connections, []}, - # Google Pub/Sub subscriber supervisor - {Realtime.CloudPubSub.Supervisor, []} - ] ++ event_bridge_children() + # Google Pub/Sub subscriber supervisor + {Realtime.CloudPubSub.Supervisor, []} + ] ++ event_bridge_children() opts = [strategy: :one_for_one, name: Realtime.Supervisor] diff --git a/realtime/lib/realtime_web/channels/org_channel.ex b/realtime/lib/realtime_web/channels/org_channel.ex index 6f2bb130..0e76a472 100644 --- a/realtime/lib/realtime_web/channels/org_channel.ex +++ b/realtime/lib/realtime_web/channels/org_channel.ex @@ -292,7 +292,13 @@ defmodule RealtimeWeb.OrgChannel do # Campaign activity: lifecycle, task progress, send/open/click/reply pulses String.contains?(event_type, "CAMPAIGN") or String.contains?(event_type, "TASK_PROGRESS") or - event_type in ["EMAIL_SENT", "EMAIL_OPENED", "EMAIL_CLICKED", "EMAIL_REPLIED", "EMAIL_BOUNCED"] -> + event_type in [ + "EMAIL_SENT", + "EMAIL_OPENED", + "EMAIL_CLICKED", + "EMAIL_REPLIED", + "EMAIL_BOUNCED" + ] -> has.(:view_campaigns) # Contact changes