Update GroupChat.js (#2382)

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
This commit is contained in:
RendyCraft047 2023-08-08 22:24:22 +07:00 • committed by GitHub
commit 1ebcdee3b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,8 +153,9 @@ class GroupChat extends Chat {
const success = await this.client.pupPage.evaluate(async (chatId, description) => {
const chatWid = window.Store.WidFactory.createWid(chatId);
let descId = window.Store.GroupMetadata.get(chatWid).descId;
let newId = await window.Store.MsgKey.newId();
try {
await window.Store.GroupUtils.setGroupDescription(chatWid, description, window.Store.MsgKey.newId(), descId);
await window.Store.GroupUtils.setGroupDescription(chatWid, description, newId, descId);
return true;
} catch (err) {
if(err.name === 'ServerStatusCodeError') return false;
@ -278,4 +279,4 @@ class GroupChat extends Chat {
}
module.exports = GroupChat;
module.exports = GroupChat;