(feat): add replys
(feat): move to SenderId (feat): other chat improvements
This commit is contained in:
parent
95a79892c6
commit
e0843a11a6
9 changed files with 6138 additions and 3234 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue