fix: filtered reactions are info, not error in device chat

bail!() bubbles up the error until it lands in the device chat,
which is way over the top for a reaction that is filtered out by channel owner.

currently this happens, as arcance chat uses different default reactions.
in the future, this may happen even more often when we allow custom filters,
that may change over time.
This commit is contained in:
B. Petersen
2026-08-11 21:21:16 +02:00
committed by biørn
parent 4623d89528
commit c680432c23
2 changed files with 3 additions and 1 deletions

View File

@@ -137,7 +137,8 @@ async fn set_msg_id_reaction(
if matches!(chat.typ, Chattype::OutBroadcast | Chattype::InBroadcast)
&& !is_allowed_reaction(reaction)
{
bail!("Reaction not allowed: {}", reaction.as_str());
info!(context, "Reaction {} filtered.", reaction.as_str());
return Ok(());
}
if reaction.is_empty() {

View File

@@ -174,6 +174,7 @@ async fn broadcast_reactions_for_one_chat(context: &Context, chat_id: ChatId) ->
/// Applies incoming, accumulated reactions received via the `Chat-Broadcast-States:` header
/// to the `broadcasted_reactions` table.
/// We do not check against allowed reactions here; reactions may be done in the past when different filters were active.
pub(crate) async fn receive_broadcast_reactions(context: &Context, json: &str) -> Result<()> {
let payload: WirePayload = serde_json::from_str(json)?;