Fix setDescription to use updated group metadata (#5793)
This commit is contained in:
parent
e66d94efd9
commit
50485349c3
1 changed files with 2 additions and 1 deletions
|
|
@ -274,7 +274,8 @@ class GroupChat extends Chat {
|
||||||
async setDescription(description) {
|
async setDescription(description) {
|
||||||
const success = await this.client.pupPage.evaluate(async (chatId, description) => {
|
const success = await this.client.pupPage.evaluate(async (chatId, description) => {
|
||||||
const chatWid = window.Store.WidFactory.createWid(chatId);
|
const chatWid = window.Store.WidFactory.createWid(chatId);
|
||||||
let descId = window.Store.GroupMetadata.get(chatWid).descId;
|
const chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
|
||||||
|
let descId = chat.groupMetadata.descId;
|
||||||
let newId = await window.Store.MsgKey.newId();
|
let newId = await window.Store.MsgKey.newId();
|
||||||
try {
|
try {
|
||||||
await window.Store.GroupUtils.setGroupDescription(chatWid, description, newId, descId);
|
await window.Store.GroupUtils.setGroupDescription(chatWid, description, newId, descId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue