diff --git a/src/structures/GroupChat.js b/src/structures/GroupChat.js index 99ce486..c2de67f 100644 --- a/src/structures/GroupChat.js +++ b/src/structures/GroupChat.js @@ -86,7 +86,7 @@ class GroupChat extends Chat { */ async setSubject(subject) { let res = await this.client.pupPage.evaluate((chatId, subject) => { - return Store.Chat.get(chatId).setSubject(subject); + return Store.Wap.changeSubject(chatId, subject); }, this.id._serialized, subject); if(res.status == 200) { @@ -100,7 +100,8 @@ class GroupChat extends Chat { */ async setDescription(description) { let res = await this.client.pupPage.evaluate((chatId, description) => { - return Store.Chat.get(chatId).setGroupDesc(description); + let descId = Store.GroupMetadata.get(chatId).descId; + return Store.Wap.setGroupDescription(chatId, description, Store.genId(), descId); }, this.id._serialized, description); if (res.status == 200) { diff --git a/src/util/Injected.js b/src/util/Injected.js index 8e42647..2109c90 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -7,6 +7,7 @@ exports.ExposeStore = (moduleRaidStr) => { eval("var moduleRaid = " + moduleRaidStr); window.mR = moduleRaid(); window.Store = window.mR.findModule("Conn")[0].default; + window.Store.genId = window.mR.findModule((module) => module.default && typeof module.default === 'function' && module.default.toString().match(/crypto/))[0].default; window.Store.SendMessage = window.mR.findModule("sendTextMsgToChat")[0].sendTextMsgToChat; }