mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fix for failed cross posted asset
This commit is contained in:
parent
5edbf45577
commit
2ec1ed4c90
@ -6,7 +6,8 @@ export async function addContactChannelTopic(server, token, channelId, message,
|
||||
let topic = await fetchWithTimeout(`https://${server}/content/channels/${channelId}/topics?contact=${token}`,
|
||||
{ method: 'POST', body: JSON.stringify({}) });
|
||||
checkResponse(topic);
|
||||
return await topic.json().id;
|
||||
let slot = await topic.json();
|
||||
return slot.id;
|
||||
}
|
||||
else if (assets == null || assets.length == 0) {
|
||||
let subject = { data: JSON.stringify(message, (key, value) => {
|
||||
@ -16,7 +17,8 @@ export async function addContactChannelTopic(server, token, channelId, message,
|
||||
let topic = await fetchWithTimeout(`https://${server}/content/channels/${channelId}/topics?contact=${token}&confirm=true`,
|
||||
{ method: 'POST', body: JSON.stringify(subject) });
|
||||
checkResponse(topic);
|
||||
return await topic.json().id;
|
||||
let slot = await topic.json();
|
||||
return slot.id;
|
||||
}
|
||||
else {
|
||||
let topic = await fetchWithTimeout(`https://${server}/content/channels/${channelId}/topics?contact=${token}`,
|
||||
|
Loading…
Reference in New Issue
Block a user