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:
Rajeh Taher 2026-02-11 01:24:54 +02:00 • committed by GitHub
commit 9b1eb76b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 70 additions and 469 deletions

View file

@ -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;