general: tree-shaking pre-MD and old comet versions (#5675)
Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com> Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
This commit is contained in:
parent
073cf3185d
commit
9b1eb76b2b
10 changed files with 70 additions and 469 deletions
|
|
@ -389,11 +389,8 @@ class GroupChat extends Chat {
|
|||
*/
|
||||
async getInviteCode() {
|
||||
const codeRes = await this.client.pupPage.evaluate(async chatId => {
|
||||
const chatWid = window.Store.WidFactory.createWid(chatId);
|
||||
try {
|
||||
return window.compareWwebVersions(window.Debug.VERSION, '>=', '2.3000.1020730154')
|
||||
? await window.Store.GroupInvite.fetchMexGroupInviteCode(chatId)
|
||||
: await window.Store.GroupInvite.queryGroupInviteCode(chatWid, true);
|
||||
return await window.Store.GroupInvite.fetchMexGroupInviteCode(chatId);
|
||||
}
|
||||
catch (err) {
|
||||
if(err.name === 'ServerStatusCodeError') return undefined;
|
||||
|
|
|
|||
Loading…
Reference in a new issue