This commit is contained in:
Adhiraj
2020-08-23 22:41:36 +05:30
parent c44413538b
commit a82d5bb1fe
3 changed files with 11 additions and 12 deletions

View File

@@ -70,12 +70,11 @@ export class WAConnection extends Base {
*/
groupUpdateSubject = async (jid: string, title: string) => {
const chat = this.chats.get (jid)
if (chat?.title === title) throw new Error ('redundant change')
if (chat?.name === title) throw new Error ('redundant change')
const response = await this.groupQuery('subject', jid, title)
if (chat) {
chat.title = title
//this.emit ('chat-update', {jid, title})
}
if (chat) chat.name = title
return response
}