moved user status data validation from front to backend

This commit is contained in:
2026-03-09 12:45:34 +08:00
parent 69cfebee3d
commit 03ae3e0829
4 changed files with 23 additions and 8 deletions

View File

@@ -13,13 +13,6 @@ export const { start: startUserStatus, stop: stopUserStatus } =
await events.friendUserStatusChanged.listen((event) => {
const { userId, status } = event.payload;
const hasValidName =
(typeof status.presenceStatus.title === "string" &&
status.presenceStatus.title.trim() !== "") ||
(typeof status.presenceStatus.subtitle === "string" &&
status.presenceStatus.subtitle.trim() !== "");
if (!hasValidName) return;
friendsPresenceStates.update((current) => ({
...current,
[userId]: status,