|
|
|
@ -110,7 +110,7 @@ class LokiMessageAPI {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await nodeFetch(publicEndpoint, {
|
|
|
|
const result = await nodeFetch(publicEndpoint, {
|
|
|
|
method: 'post',
|
|
|
|
method: 'post',
|
|
|
|
headers: {
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
@ -118,6 +118,8 @@ class LokiMessageAPI {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
body: JSON.stringify(payload),
|
|
|
|
body: JSON.stringify(payload),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
const body = await result.json();
|
|
|
|
|
|
|
|
messageEventData.serverId = body.data.id;
|
|
|
|
window.Whisper.events.trigger('publicMessageSent', messageEventData);
|
|
|
|
window.Whisper.events.trigger('publicMessageSent', messageEventData);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
|