From ee3da86230031704041d31337726fb6ff7b5d0e3 Mon Sep 17 00:00:00 2001 From: mdashlw Date: Fri, 28 Feb 2025 09:30:56 +0000 Subject: [PATCH] Broadcast batch tag updates to firehose --- .../controllers/admin/batch/tag_controller.ex | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/philomena_web/controllers/admin/batch/tag_controller.ex b/lib/philomena_web/controllers/admin/batch/tag_controller.ex index 835917a0..32e4a3a4 100644 --- a/lib/philomena_web/controllers/admin/batch/tag_controller.ex +++ b/lib/philomena_web/controllers/admin/batch/tag_controller.ex @@ -44,6 +44,16 @@ defmodule PhilomenaWeb.Admin.Batch.TagController do case Images.batch_update(image_ids, added_tags, removed_tags, attributes) do {:ok, _} -> + PhilomenaWeb.Endpoint.broadcast!( + "firehose", + "image:batch_tag_update", + %{ + image_ids: image_ids, + added: Enum.map(added_tags, & &1.name), + removed: Enum.map(removed_tags, & &1.name) + } + ) + conn |> moderation_log( details: &log_details/2,