mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 11:39:17 +00:00
catch when message failed to save
This commit is contained in:
parent
b57b32b55c
commit
a18f9de11c
@ -169,13 +169,13 @@ export function useConversationContext() {
|
|||||||
if (entry.data) {
|
if (entry.data) {
|
||||||
if (entry.data.topicDetail) {
|
if (entry.data.topicDetail) {
|
||||||
const item = mapTopicEntry(entry);
|
const item = mapTopicEntry(entry);
|
||||||
setTopicItem(cardId, channelId, item);
|
await setTopicItem(cardId, channelId, item);
|
||||||
topics.current.set(item.topicId, item);
|
topics.current.set(item.topicId, item);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const topic = await getTopic(cardId, channelId, entry.id);
|
const topic = await getTopic(cardId, channelId, entry.id);
|
||||||
const item = mapTopicEntry(topic);
|
const item = mapTopicEntry(topic);
|
||||||
setTopicItem(cardId, channelId, item);
|
await setTopicItem(cardId, channelId, item);
|
||||||
topics.current.set(item.topicId, item);
|
topics.current.set(item.topicId, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user