(feat): add replys
Some checks failed
/ build-web (push) Successful in 6m31s
/ build-desktop (linux) (push) Failing after 7m9s
/ release (push) Has been cancelled
/ build-mobile (push) Has been cancelled

(feat): move to SenderId
(feat): other chat improvements
This commit is contained in:
Alois 2026-07-06 23:08:55 +02:00
commit e0843a11a6
9 changed files with 6138 additions and 3234 deletions

View file

@ -68,13 +68,14 @@ const callSecretEnvelopeRequest = z.object({
export const Message = z.object({
NotEncrypted: z.boolean().optional(),
SentBySelf: z.boolean().optional(),
SenderId: z.number(),
SendTime: z.number(),
Content: z.base64(),
Files: z.array(fileFromMessage).optional(),
Tint: z.string().length(7).startsWith("#").optional(),
Avatar: z.boolean().optional(),
Display: z.boolean().optional(),
ReplyId: z.number().optional(),
MessageState: z
.enum(["read", "received", "sent", "sending", "awaiting"]) // awaiting for 'internal' use
.default("received"),
@ -201,6 +202,12 @@ export const mtp = {
Message,
}),
},
MessageGet: {
request: z.object({
SendTime: z.number(),
}),
response: Message,
},
MessagesGet: {
request: z.object({
UserId: z.number(),