fix: local message retain

This commit is contained in:
Tristan Yang
2025-08-11 08:51:04 +08:00
parent a55bc92909
commit 90e4b3f3dc
2 changed files with 6 additions and 3 deletions
@@ -15,8 +15,11 @@ export default async function handler({ operation, data = {}, payload }: Params)
case "addMessage":
case "updateMessage":
{
const { mid } = payload;
await table?.setItem(mid + "", data[mid]);
const { mid, properties } = payload;
if (mid != properties?.local_id) {
// 不要存本地消息
await table?.setItem(mid + "", data[mid]);
}
}
break;
case "removeMessage":