catch when message failed to save

This commit is contained in:
Roland Osborne 2023-05-05 13:51:14 -07:00
parent b57b32b55c
commit a18f9de11c

View File

@ -169,13 +169,13 @@ export function useConversationContext() {
if (entry.data) {
if (entry.data.topicDetail) {
const item = mapTopicEntry(entry);
setTopicItem(cardId, channelId, item);
await setTopicItem(cardId, channelId, item);
topics.current.set(item.topicId, item);
}
else {
const topic = await getTopic(cardId, channelId, entry.id);
const item = mapTopicEntry(topic);
setTopicItem(cardId, channelId, item);
await setTopicItem(cardId, channelId, item);
topics.current.set(item.topicId, item);
}
}