in client/src/app/service/utils.js [11:26]
export async function approvePermissionsAndUnfurlDomains(permissions, unfurlDomains) {
let response = await new Promise((resolve) => {
const channel = new MessageChannel();
channel.port1.onmessage = e => resolve(e.data);
window.parent.postMessage({
type: "ApprovePermissionsRequest",
permissionScope: permissions,
unfurlDomains: unfurlDomains, // doesn't work for now, but should with the next deployment of Space
purpose: ""
}, "*", [channel.port2]);
});
if (response.success) {
homepageData.onPermissionsAndDomainsApproved()
}
}