FEATURE: prevent chat emails for messages created via SDK (#27875)

This change allows us to distinguish between regular user generated chat messages and those created via the Chat SDK.

A new created_by_sdk boolean column is added to the Chat Messages table. When this value is true, we will not include the message in the user summary email that is sent to users.
This commit is contained in:
David Battersby
2024-07-12 10:57:14 +04:00
committed by GitHub
parent a0283305ca
commit 4a365bc4a2
7 changed files with 48 additions and 0 deletions

View File

@ -133,6 +133,7 @@ module ChatSDK
enforce_membership: enforce_membership,
force_thread: force_thread,
strip_whitespaces: strip_whitespaces,
created_by_sdk: true,
) do
on_model_not_found(:channel) { raise "Couldn't find channel with id: `#{channel_id}`" }
on_model_not_found(:membership) do