mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
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:
@ -15,6 +15,11 @@ describe ChatSDK::Message do
|
||||
expect(message.message).to eq("something")
|
||||
end
|
||||
|
||||
it "sets created_by_sdk to true" do
|
||||
message = described_class.create(**params)
|
||||
expect(message).to have_attributes(created_by_sdk: true)
|
||||
end
|
||||
|
||||
context "when thread_id is present" do
|
||||
fab!(:thread_1) { Fabricate(:chat_thread, channel: channel_1) }
|
||||
|
||||
|
Reference in New Issue
Block a user