fix and update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { BadRequestException, ForbiddenException, Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { PrismaService } from '../infra/prisma.service';
|
||||
import { resolveVerificationIcon } from './verification.constants';
|
||||
import { FamilyService } from './family.service';
|
||||
import { NotificationsService } from './notifications.service';
|
||||
|
||||
@@ -467,7 +468,7 @@ export class ChatService {
|
||||
id: string;
|
||||
userId: string;
|
||||
notificationsMuted: boolean;
|
||||
user: { displayName: string; avatarStorageKey: string | null };
|
||||
user: { displayName: string; avatarStorageKey: string | null; isVerified: boolean; verificationIcon: string | null };
|
||||
}>;
|
||||
},
|
||||
familyRoleByUserId: Map<string, string>,
|
||||
@@ -486,6 +487,8 @@ export class ChatService {
|
||||
userId: member.userId,
|
||||
displayName: member.user.displayName,
|
||||
hasAvatar: Boolean(member.user.avatarStorageKey),
|
||||
isVerified: member.user.isVerified,
|
||||
verificationIcon: member.user.isVerified ? resolveVerificationIcon(member.user.verificationIcon) : undefined,
|
||||
notificationsMuted: member.notificationsMuted,
|
||||
familyRole: familyRoleByUserId.get(member.userId) ?? 'member',
|
||||
isChatCreator: room.createdById === member.userId
|
||||
@@ -594,7 +597,7 @@ export class ChatService {
|
||||
createdAt: Date;
|
||||
editedAt?: Date | null;
|
||||
deletedAt?: Date | null;
|
||||
sender: { displayName: string; avatarStorageKey: string | null };
|
||||
sender: { displayName: string; avatarStorageKey: string | null; isVerified: boolean; verificationIcon: string | null };
|
||||
poll?: {
|
||||
id: string;
|
||||
question: string;
|
||||
@@ -621,6 +624,8 @@ export class ChatService {
|
||||
senderId: message.senderId,
|
||||
senderName: message.sender.displayName,
|
||||
senderHasAvatar: Boolean(message.sender.avatarStorageKey),
|
||||
senderIsVerified: message.sender.isVerified,
|
||||
senderVerificationIcon: message.sender.isVerified ? resolveVerificationIcon(message.sender.verificationIcon) : undefined,
|
||||
type: message.type,
|
||||
content: isDeleted ? undefined : message.content ?? undefined,
|
||||
replyToId: message.replyToId ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user