fit message sernder can be null

This commit is contained in:
Peter Maquiran
2024-09-05 13:18:36 +01:00
parent b0e1dd74cd
commit 074b750b56
4 changed files with 42 additions and 7 deletions
+3 -3
View File
@@ -50,7 +50,7 @@ export const MessageEntitySchema = z.object({
wxFullName: z.string(),
wxeMail: z.string(),
userPhoto: z.string().nullable(),
}),
}).nullable(),
reactions: z.object({
id: z.string(),
reactedAt: z.string(),
@@ -65,7 +65,7 @@ export const MessageEntitySchema = z.object({
sending: z.boolean().optional(),
attachments: z.array(MessageEntityAttachmentSchema).optional(),
origin: z.enum(['history', 'local', 'incoming']).optional(),
requestId: z.string().optional(),
requestId: z.string().nullable().optional(),
sendAttemp: z.number().optional(),
hasAttachment: z.boolean().optional()
})
@@ -110,7 +110,7 @@ export class MessageEntity {
}
meSender() {
return this.sender.wxUserId == SessionStore.user.UserId
return this.sender?.wxUserId == SessionStore.user.UserId
}
}