mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
refactor: Update content_attributes in ChatwootService
This commit refactors the code in ChatwootService to update the content_attributes when replyToIds are present. Instead of directly spreading the replyToIds object, the code now converts it to a JSON string and appends it to the data object. Refactor the code to improve readability and maintainability.
This commit is contained in:
parent
ec2b7f94f8
commit
aa8396d437
@ -954,9 +954,10 @@ export class ChatwootService {
|
||||
const replyToIds = await this.getReplyToIds(messageBody, instance);
|
||||
|
||||
if (replyToIds.in_reply_to || replyToIds.in_reply_to_external_id) {
|
||||
data.append('content_attributes', {
|
||||
...replyToIds,
|
||||
});
|
||||
const content = JSON.stringify({
|
||||
...replyToIds
|
||||
})
|
||||
data.append('content_attributes', content);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user