update and fix messanger

This commit is contained in:
lendry
2026-06-26 00:16:17 +03:00
parent b0ea87e898
commit 4e78a81eb1
14 changed files with 898 additions and 125 deletions

View File

@@ -6,6 +6,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
import { useToast } from '@/components/id/toast-provider';
import { useAvatarUrl } from '@/hooks/use-avatar-url';
import { apiFetch, getApiErrorMessage, uploadMediaObject } from '@/lib/api';
import { dispatchAvatarUpdated } from '@/lib/avatar-events';
import { VerificationBadge } from '@/components/id/verification-badge';
import { cn } from '@/lib/utils';
@@ -72,6 +73,7 @@ export function AvatarUpload({
await onUpdated();
await refreshAvatarUrl();
dispatchAvatarUpdated(userId);
showToast('Аватар обновлён');
} catch (error) {
const message = getApiErrorMessage(error, 'Не удалось загрузить аватар');