Store: remove all mentions of window.Store (#127077)
* Store: remove all mentions of window.Store * Apply suggestion from @BenyFilho Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com> --------- Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
This commit is contained in:
parent
9e42f1e0c3
commit
883d7e4eda
1 changed files with 522 additions and 754 deletions
|
|
@ -155,8 +155,8 @@ class Contact extends Base {
|
|||
if(this.isGroup) return false;
|
||||
|
||||
await this.client.pupPage.evaluate(async (contactId) => {
|
||||
const contact = window.Store.Contact.get(contactId);
|
||||
await window.Store.BlockContact.blockContact({contact});
|
||||
const contact = (window.require('WAWebCollections')).Contact.get(contactId);
|
||||
await (window.require('WAWebBlockContactAction')).blockContact({contact});
|
||||
}, this.id._serialized);
|
||||
|
||||
this.isBlocked = true;
|
||||
|
|
@ -171,8 +171,8 @@ class Contact extends Base {
|
|||
if(this.isGroup) return false;
|
||||
|
||||
await this.client.pupPage.evaluate(async (contactId) => {
|
||||
const contact = window.Store.Contact.get(contactId);
|
||||
await window.Store.BlockContact.unblockContact(contact);
|
||||
const contact = (window.require('WAWebCollections')).Contact.get(contactId);
|
||||
await (window.require('WAWebBlockContactAction')).unblockContact(contact);
|
||||
}, this.id._serialized);
|
||||
|
||||
this.isBlocked = false;
|
||||
|
|
@ -185,8 +185,8 @@ class Contact extends Base {
|
|||
*/
|
||||
async getAbout() {
|
||||
const about = await this.client.pupPage.evaluate(async (contactId) => {
|
||||
const wid = window.Store.WidFactory.createWid(contactId);
|
||||
return window.Store.StatusUtils.getStatus({'token':'', 'wid': wid});
|
||||
const wid = window.require('WAWebWidFactory').createWid(contactId);
|
||||
return (window.require('WAWebContactStatusBridge')).getStatus({'token':'', 'wid': wid});
|
||||
}, this.id._serialized);
|
||||
|
||||
if (typeof about.status !== 'string')
|
||||
|
|
|
|||
Loading…
Reference in a new issue