diff --git a/src/WAConnection/3.Connect.ts b/src/WAConnection/3.Connect.ts index 0d4ca02..8b67f06 100644 --- a/src/WAConnection/3.Connect.ts +++ b/src/WAConnection/3.Connect.ts @@ -162,9 +162,11 @@ export class WAConnection extends Base { this.on ('close', rejectTask) }).finally (deregisterCallbacks) - this.chats.all ().forEach (chat => { + this.chats + .all () + .forEach (chat => { const respectiveContact = this.contacts[chat.jid] - chat.title = respectiveContact?.name || respectiveContact?.notify + chat.name = respectiveContact?.name || respectiveContact?.notify || chat.name }) } private releasePendingRequests () { diff --git a/src/WAConnection/Constants.ts b/src/WAConnection/Constants.ts index 42dd2df..2aa13c2 100644 --- a/src/WAConnection/Constants.ts +++ b/src/WAConnection/Constants.ts @@ -143,10 +143,10 @@ export interface WAChat { pin?: string spam: 'false' | 'true' modify_tag: string + name?: string // Baileys added properties messages: WAMessage[] - title?: string imgUrl?: string } export enum WAMetric {