core: Make the internal ssb.* API more explicitly not exposed to apps.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
This commit is contained in:
13
core/core.js
13
core/core.js
@@ -312,7 +312,7 @@ async function getProcessBlob(blobId, key, options) {
|
||||
{
|
||||
action: 'identities',
|
||||
},
|
||||
await ssb.getIdentityInfo(
|
||||
await ssb_internal.getIdentityInfo(
|
||||
process?.credentials?.session?.name,
|
||||
options?.packageOwner,
|
||||
options?.packageName
|
||||
@@ -551,9 +551,6 @@ async function getProcessBlob(blobId, key, options) {
|
||||
);
|
||||
}
|
||||
};
|
||||
imports.ssb.addEventListener = undefined;
|
||||
imports.ssb.removeEventListener = undefined;
|
||||
imports.ssb.getIdentityInfo = undefined;
|
||||
|
||||
if (
|
||||
process.credentials &&
|
||||
@@ -683,19 +680,19 @@ async function getProcessBlob(blobId, key, options) {
|
||||
/**
|
||||
* SSB message added callback.
|
||||
*/
|
||||
ssb.addEventListener('message', function () {
|
||||
ssb_internal.addEventListener('message', function () {
|
||||
broadcastEvent('onMessage', [...arguments]);
|
||||
});
|
||||
|
||||
ssb.addEventListener('blob', function () {
|
||||
ssb_internal.addEventListener('blob', function () {
|
||||
broadcastEvent('onBlob', [...arguments]);
|
||||
});
|
||||
|
||||
ssb.addEventListener('broadcasts', function () {
|
||||
ssb_internal.addEventListener('broadcasts', function () {
|
||||
broadcastEvent('onBroadcastsChanged', []);
|
||||
});
|
||||
|
||||
ssb.addEventListener('connections', function () {
|
||||
ssb_internal.addEventListener('connections', function () {
|
||||
broadcastEvent('onConnectionsChanged', []);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user