*group: parse @lids properly when processing group notifications
*This commit is breaking, it changes the format of participants in group-participants.update.
This commit is contained in:
+16
-2
@@ -4,7 +4,13 @@ import type { AuthenticationCreds } from './Auth'
|
||||
import type { WACallEvent } from './Call'
|
||||
import type { Chat, ChatUpdate, PresenceData } from './Chat'
|
||||
import type { Contact } from './Contact'
|
||||
import type { GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod } from './GroupMetadata'
|
||||
import type {
|
||||
GroupMetadata,
|
||||
GroupParticipant,
|
||||
ParticipantAction,
|
||||
RequestJoinAction,
|
||||
RequestJoinMethod
|
||||
} from './GroupMetadata'
|
||||
import type { Label } from './Label'
|
||||
import type { LabelAssociation } from './LabelAssociation'
|
||||
import type { MessageUpsertType, MessageUserReceiptUpdate, WAMessage, WAMessageKey, WAMessageUpdate } from './Message'
|
||||
@@ -56,11 +62,19 @@ export type BaileysEventMap = {
|
||||
'groups.upsert': GroupMetadata[]
|
||||
'groups.update': Partial<GroupMetadata>[]
|
||||
/** apply an action to participants in a group */
|
||||
'group-participants.update': { id: string; author: string; participants: string[]; action: ParticipantAction }
|
||||
'group-participants.update': {
|
||||
id: string
|
||||
author: string
|
||||
authorPn?: string
|
||||
participants: GroupParticipant[]
|
||||
action: ParticipantAction
|
||||
}
|
||||
'group.join-request': {
|
||||
id: string
|
||||
author: string
|
||||
authorPn?: string
|
||||
participant: string
|
||||
participantPn?: string
|
||||
action: RequestJoinAction
|
||||
method: RequestJoinMethod
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ export interface GroupMetadata {
|
||||
inviteCode?: string
|
||||
/** the person who added you to group or changed some setting in group */
|
||||
author?: string
|
||||
authorPn?: string
|
||||
}
|
||||
|
||||
export interface WAGroupCreateResponse {
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { CacheStore } from './Socket'
|
||||
|
||||
// export the WAMessage Prototypes
|
||||
export { proto as WAProto }
|
||||
export type WAMessage = proto.IWebMessageInfo & { key: WAMessageKey }
|
||||
export type WAMessage = proto.IWebMessageInfo & { key: WAMessageKey; messageStubParameters?: any }
|
||||
export type WAMessageContent = proto.IMessage
|
||||
export type WAContactMessage = proto.Message.IContactMessage
|
||||
export type WAContactsArrayMessage = proto.Message.IContactsArrayMessage
|
||||
|
||||
Reference in New Issue
Block a user