lid, wip: Support LIDs in Baileys (#1747)

* lid-mapping: get missing lid from usync

* lid-mapping, jid-utils: change to isPnUser and store multiple mappings

* process-message: parse protocolMsg mapping, and store from new msgs

* types: lid-mapping event, addressing enum, alt, contact, group types

* validate, decode: use lid for identity, better logic

* lid: final commit

* linting

* linting

* linting

* linting

* misc: fix testing and also remove version json

* lint: IDE fucking up lint

* lid-mapping: fix build error on NPM

* message-retry: fix proto import
This commit is contained in:
Rajeh Taher
2025-09-08 10:03:28 +03:00
committed by GitHub
parent ca22ae5f9c
commit 20693a59d0
27 changed files with 630 additions and 405 deletions
+6 -4
View File
@@ -1,4 +1,5 @@
import type { Contact } from './Contact'
import type { WAMessageAddressingMode } from './Message'
export type GroupParticipant = Contact & {
isAdmin?: boolean
@@ -14,21 +15,22 @@ export type RequestJoinMethod = 'invite_link' | 'linked_group_join' | 'non_admin
export interface GroupMetadata {
id: string
notify?: string
/** group uses 'lid' or 'pn' to send messages */
addressingMode: 'pn' | 'lid'
addressingMode?: WAMessageAddressingMode
owner: string | undefined
ownerJid?: string | undefined
ownerPn?: string | undefined
owner_country_code?: string | undefined
subject: string
/** group subject owner */
subjectOwner?: string
subjectOwnerJid?: string
subjectOwnerPn?: string
/** group subject modification date */
subjectTime?: number
creation?: number
desc?: string
descOwner?: string
descOwnerJid?: string
descOwnerPn?: string
descId?: string
descTime?: number
/** if this group is part of a community, it returns the jid of the community to which it belongs */