Update GroupChat.js (#2382)
Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
This commit is contained in:
parent
096e84b0a9
commit
1ebcdee3b9
1 changed files with 3 additions and 2 deletions
|
|
@ -153,8 +153,9 @@ class GroupChat extends Chat {
|
||||||
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;
|
let descId = window.Store.GroupMetadata.get(chatWid).descId;
|
||||||
|
let newId = await window.Store.MsgKey.newId();
|
||||||
try {
|
try {
|
||||||
await window.Store.GroupUtils.setGroupDescription(chatWid, description, window.Store.MsgKey.newId(), descId);
|
await window.Store.GroupUtils.setGroupDescription(chatWid, description, newId, descId);
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if(err.name === 'ServerStatusCodeError') return false;
|
if(err.name === 'ServerStatusCodeError') return false;
|
||||||
|
|
@ -278,4 +279,4 @@ class GroupChat extends Chat {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = GroupChat;
|
module.exports = GroupChat;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue