Removed ssb.addEventListener and ssb.removeEventListener from the public API. Can do the same thing with core.register.

This commit is contained in:
2024-05-22 18:51:21 -04:00
parent b883e6a485
commit 1be94ae0be
6 changed files with 15 additions and 10 deletions

View File

@ -678,6 +678,8 @@ async function getProcessBlob(blobId, key, options) {
);
}
};
imports.ssb.addEventListener = undefined;
imports.ssb.removeEventListener = undefined;
imports.ssb.getIdentityInfo = undefined;
imports.fetch = function (url, options) {
return http.fetch(url, options, gGlobalSettings.fetch_hosts);
@ -1228,6 +1230,10 @@ async function blobHandler(request, response, blobId, uri) {
}
}
ssb.addEventListener('message', function () {
broadcastEvent('onMessage', [...arguments]);
});
ssb.addEventListener('broadcasts', function () {
broadcastEvent('onBroadcastsChanged', []);
});