chore: bump version to v0.9.75 and enhance message logging in chat handler
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vocechat-web",
|
||||
"version": "0.9.74",
|
||||
"version": "0.9.75",
|
||||
"homepage": "https://voce.chat",
|
||||
"dependencies": {
|
||||
"@metamask/onboarding": "^1.0.1",
|
||||
|
||||
@@ -141,6 +141,23 @@ const handler = (
|
||||
);
|
||||
// }
|
||||
});
|
||||
// 推给 PC 端(自己发的不推送)
|
||||
if (!self) {
|
||||
const state = store.getState();
|
||||
const sender = state.users.byId[from_uid]?.name ?? "";
|
||||
const channel =
|
||||
to === "channel"
|
||||
? state.channels.byId[id]?.name ?? ""
|
||||
: state.users.byId[id]?.name ?? "";
|
||||
const text =
|
||||
content_type === ContentTypes.file
|
||||
? "[文件]"
|
||||
: truncate(content, 100);
|
||||
console.info(
|
||||
"{{NEW_MSG}}" +
|
||||
JSON.stringify({ channel, sender, content: text })
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "reaction":
|
||||
|
||||
Reference in New Issue
Block a user