mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: correctly handle presence being offline for receipts
When sendPresenceUpdate('unavailable') is called, it should allow notifications to be received on the phone
This commit is contained in:
@@ -24,7 +24,7 @@ export type MessageType = keyof proto.Message
|
||||
|
||||
export type DownloadableMessage = { mediaKey?: Uint8Array, directPath?: string, url?: string }
|
||||
|
||||
export type MessageReceiptType = 'read' | 'read-self' | 'hist_sync' | 'peer_msg' | 'sender' | undefined
|
||||
export type MessageReceiptType = 'read' | 'read-self' | 'hist_sync' | 'peer_msg' | 'sender' | 'inactive' | undefined
|
||||
|
||||
export type MediaConnInfo = {
|
||||
auth: string
|
||||
|
||||
@@ -21,5 +21,9 @@ export type ConnectionState = {
|
||||
phoneConnected: boolean
|
||||
user?: Contact
|
||||
}
|
||||
|
||||
/**
|
||||
* if the client is shown as an active, online client.
|
||||
* If this is false, the primary phone and other devices will receive notifs
|
||||
* */
|
||||
isOnline?: boolean
|
||||
}
|
||||
@@ -24,6 +24,8 @@ export type SocketConfig = CommonSocketConfig<AuthenticationState> & {
|
||||
transactionOpts: TransactionCapabilityOptions
|
||||
/** provide a cache to store a user's device list */
|
||||
userDevicesCache?: NodeCache
|
||||
/** marks the client as online whenever the socket successfully connects */
|
||||
markOnlineOnConnect: boolean
|
||||
/**
|
||||
* map to store the retry counts for failed messages;
|
||||
* used to determine whether to retry a message or not */
|
||||
|
||||
Reference in New Issue
Block a user