mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
finalize multi-device
This commit is contained in:
@@ -1,46 +1,30 @@
|
||||
import type { proto } from "../../WAProto"
|
||||
|
||||
/** set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send */
|
||||
export enum Presence {
|
||||
unavailable = 'unavailable', // "offline"
|
||||
available = 'available', // "online"
|
||||
composing = 'composing', // "typing..."
|
||||
recording = 'recording', // "recording..."
|
||||
paused = 'paused', // stop typing
|
||||
}
|
||||
export type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused'
|
||||
|
||||
export interface PresenceData {
|
||||
lastKnownPresence: Presence
|
||||
lastKnownPresence: WAPresence
|
||||
lastSeen?: number
|
||||
}
|
||||
|
||||
export interface Chat {
|
||||
jid: string
|
||||
|
||||
t: number
|
||||
/** number of unread messages, is < 0 if the chat is manually marked unread */
|
||||
count: number
|
||||
archive?: 'true' | 'false'
|
||||
clear?: 'true' | 'false'
|
||||
read_only?: 'true' | 'false'
|
||||
mute?: string
|
||||
pin?: string
|
||||
spam?: 'false' | 'true'
|
||||
modify_tag?: string
|
||||
name?: string
|
||||
/** when ephemeral messages were toggled on */
|
||||
eph_setting_ts?: string
|
||||
/** how long each message lasts for */
|
||||
ephemeral?: string
|
||||
export type Chat = Omit<proto.IConversation, 'messages'> & {
|
||||
/** unix timestamp of date when mute ends, if applicable */
|
||||
mute?: number | null
|
||||
/** timestamp of when pinned */
|
||||
pin?: number | null
|
||||
archive?: boolean
|
||||
}
|
||||
|
||||
export type ChatModification =
|
||||
{ archive: boolean } |
|
||||
{
|
||||
/** pin at current timestamp, or provide timestamp of pin to remove */
|
||||
pin: true | { remove: number }
|
||||
pin: number | null
|
||||
} |
|
||||
{
|
||||
/** mute for duration, or provide timestamp of mute to remove*/
|
||||
mute: number | { remove: number }
|
||||
mute: number | null
|
||||
} |
|
||||
{
|
||||
clear: 'all' | { messages: { id: string, fromMe?: boolean }[] }
|
||||
@@ -51,4 +35,7 @@ export type ChatModification =
|
||||
star: boolean
|
||||
}
|
||||
} |
|
||||
{
|
||||
markRead: boolean
|
||||
} |
|
||||
{ delete: true }
|
||||
Reference in New Issue
Block a user