fix(web): handle blocked users fetch fallback in chat info
Some checks failed
CI / test (push) Failing after 24s

This commit is contained in:
2026-03-08 02:35:08 +03:00
parent 0b4bb19425
commit 66158b9070

View File

@@ -76,9 +76,15 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
setMuted(notificationSettings.muted);
}
if (detail.type === "private" && !detail.is_saved && detail.counterpart_user_id) {
const blocked = await listBlockedUsers();
if (!cancelled) {
setCounterpartBlocked(blocked.some((u) => u.id === detail.counterpart_user_id));
try {
const blocked = await listBlockedUsers();
if (!cancelled) {
setCounterpartBlocked(blocked.some((u) => u.id === detail.counterpart_user_id));
}
} catch {
if (!cancelled) {
setCounterpartBlocked(false);
}
}
} else if (!cancelled) {
setCounterpartBlocked(false);