fix: Set message sender to macros excution (#5769)
This commit is contained in:
@@ -3,6 +3,7 @@ class Macros::ExecutionService < ActionService
|
||||
super(conversation)
|
||||
@macro = macro
|
||||
@account = macro.account
|
||||
@user = user
|
||||
Current.user = user
|
||||
end
|
||||
|
||||
@@ -27,7 +28,7 @@ class Macros::ExecutionService < ActionService
|
||||
params = { content: message[0], private: false }
|
||||
|
||||
# Added reload here to ensure conversation us persistent with the latest updates
|
||||
mb = Messages::MessageBuilder.new(nil, @conversation.reload, params)
|
||||
mb = Messages::MessageBuilder.new(@user, @conversation.reload, params)
|
||||
mb.perform
|
||||
end
|
||||
|
||||
@@ -43,7 +44,7 @@ class Macros::ExecutionService < ActionService
|
||||
params = { content: nil, private: false, attachments: blobs }
|
||||
|
||||
# Added reload here to ensure conversation us persistent with the latest updates
|
||||
mb = Messages::MessageBuilder.new(nil, @conversation.reload, params)
|
||||
mb = Messages::MessageBuilder.new(@user, @conversation.reload, params)
|
||||
mb.perform
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user