Skip to content

Commit

Permalink
[FIX] Livechat webhook request without headers (#22589)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored and sampaiodiego committed Jul 8, 2021
1 parent 5b903f8 commit 9cdf4f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/livechat/server/lib/Livechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ export const Livechat = {
return;
}
const secretToken = settings.get('Livechat_secret_token');
const headers = { headers: { 'X-RocketChat-Livechat-Token': secretToken } };
const headers = { 'X-RocketChat-Livechat-Token': secretToken };
const options = { data: postData, ...secretToken !== '' && secretToken !== undefined && { headers } };
try {
return HTTP.post(settings.get('Livechat_webhookUrl'), options);
Expand Down

0 comments on commit 9cdf4f5

Please sign in to comment.