fixing asset upload on contact hosted channel

This commit is contained in:
balzack 2023-03-05 23:23:49 -08:00
parent 9d4efcdc17
commit 749960b262

View File

@ -376,7 +376,7 @@ export function useCardContext() {
const node = profile?.node; const node = profile?.node;
if (files?.length > 0) { if (files?.length > 0) {
const topicId = await addContactChannelTopic(node, cardToken, channelId, null, null, null); const topicId = await addContactChannelTopic(node, cardToken, channelId, null, null, null);
upload.actions.addContactTopic(node, cardToken, cardId, channelId, topicId, files, async (assets) => { upload.actions.addTopic(node, cardToken, channelId, topicId, files, async (assets) => {
const subject = message(assets); const subject = message(assets);
await setContactChannelTopicSubject(node, cardToken, channelId, topicId, type, subject); await setContactChannelTopicSubject(node, cardToken, channelId, topicId, type, subject);
}, async () => { }, async () => {
@ -386,7 +386,7 @@ export function useCardContext() {
catch (err) { catch (err) {
console.log(err); console.log(err);
} }
}); }, cardId);
} }
else { else {
const subject = message([]); const subject = message([]);