fix(web): handle blocked users fetch fallback in chat info
Some checks failed
CI / test (push) Failing after 24s
Some checks failed
CI / test (push) Failing after 24s
This commit is contained in:
@@ -76,9 +76,15 @@ export function ChatInfoPanel({ chatId, open, onClose }: Props) {
|
|||||||
setMuted(notificationSettings.muted);
|
setMuted(notificationSettings.muted);
|
||||||
}
|
}
|
||||||
if (detail.type === "private" && !detail.is_saved && detail.counterpart_user_id) {
|
if (detail.type === "private" && !detail.is_saved && detail.counterpart_user_id) {
|
||||||
const blocked = await listBlockedUsers();
|
try {
|
||||||
if (!cancelled) {
|
const blocked = await listBlockedUsers();
|
||||||
setCounterpartBlocked(blocked.some((u) => u.id === detail.counterpart_user_id));
|
if (!cancelled) {
|
||||||
|
setCounterpartBlocked(blocked.some((u) => u.id === detail.counterpart_user_id));
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
if (!cancelled) {
|
||||||
|
setCounterpartBlocked(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (!cancelled) {
|
} else if (!cancelled) {
|
||||||
setCounterpartBlocked(false);
|
setCounterpartBlocked(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user