fix: group invite v4 (#2321)
* Update Injected.js * Update Client.js * fix changes * make it simple * fix if undefined --------- Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
This commit is contained in:
parent
dce964d934
commit
d959645bc3
3 changed files with 5 additions and 4 deletions
|
|
@ -933,7 +933,8 @@ class Client extends EventEmitter {
|
||||||
if (inviteInfo.inviteCodeExp == 0) throw 'Expired invite code';
|
if (inviteInfo.inviteCodeExp == 0) throw 'Expired invite code';
|
||||||
return this.pupPage.evaluate(async inviteInfo => {
|
return this.pupPage.evaluate(async inviteInfo => {
|
||||||
let { groupId, fromId, inviteCode, inviteCodeExp } = inviteInfo;
|
let { groupId, fromId, inviteCode, inviteCodeExp } = inviteInfo;
|
||||||
return await window.Store.JoinInviteV4.sendJoinGroupViaInviteV4(inviteCode, String(inviteCodeExp), groupId, fromId);
|
let userWid = window.Store.WidFactory.createWid(fromId);
|
||||||
|
return await window.Store.JoinInviteV4.joinGroupViaInviteV4(inviteCode, String(inviteCodeExp), groupId, userWid);
|
||||||
}, inviteInfo);
|
}, inviteInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,8 +168,8 @@ class Message extends Base {
|
||||||
inviteCodeExp: data.inviteCodeExp,
|
inviteCodeExp: data.inviteCodeExp,
|
||||||
groupId: data.inviteGrp,
|
groupId: data.inviteGrp,
|
||||||
groupName: data.inviteGrpName,
|
groupName: data.inviteGrpName,
|
||||||
fromId: data.from._serialized,
|
fromId: data.from?._serialized ? data.from._serialized : data.from,
|
||||||
toId: data.to._serialized
|
toId: data.to?._serialized ? data.to._serialized : data.to
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||||
window.Store.PresenceUtils = window.mR.findModule('sendPresenceAvailable')[0];
|
window.Store.PresenceUtils = window.mR.findModule('sendPresenceAvailable')[0];
|
||||||
window.Store.ChatState = window.mR.findModule('sendChatStateComposing')[0];
|
window.Store.ChatState = window.mR.findModule('sendChatStateComposing')[0];
|
||||||
window.Store.GroupParticipants = window.mR.findModule('promoteParticipants')[0];
|
window.Store.GroupParticipants = window.mR.findModule('promoteParticipants')[0];
|
||||||
window.Store.JoinInviteV4 = window.mR.findModule('sendJoinGroupViaInviteV4')[0];
|
window.Store.JoinInviteV4 = window.mR.findModule('queryGroupInviteV4')[0];
|
||||||
window.Store.findCommonGroups = window.mR.findModule('findCommonGroups')[0].findCommonGroups;
|
window.Store.findCommonGroups = window.mR.findModule('findCommonGroups')[0].findCommonGroups;
|
||||||
window.Store.StatusUtils = window.mR.findModule('setMyStatus')[0];
|
window.Store.StatusUtils = window.mR.findModule('setMyStatus')[0];
|
||||||
window.Store.ConversationMsgs = window.mR.findModule('loadEarlierMsgs')[0];
|
window.Store.ConversationMsgs = window.mR.findModule('loadEarlierMsgs')[0];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue