forked from cory/tildefriends
		
	Removed ssb.addEventListener and ssb.removeEventListener from the public API. Can do the same thing with core.register.
This commit is contained in:
		| @@ -76,7 +76,7 @@ tfrpc.register(function getHash(id, message) { | ||||
| tfrpc.register(function setHash(hash) { | ||||
| 	return app.setHash(hash); | ||||
| }); | ||||
| ssb.addEventListener('message', async function (id) { | ||||
| core.register('onMessage', async function (id) { | ||||
| 	await tfrpc.rpc.notifyNewMessage(id); | ||||
| }); | ||||
| tfrpc.register(async function store_blob(blob) { | ||||
| @@ -103,7 +103,7 @@ tfrpc.register(async function encrypt(id, recipients, content) { | ||||
| tfrpc.register(async function getActiveIdentity() { | ||||
| 	return await ssb.getActiveIdentity(); | ||||
| }); | ||||
| ssb.addEventListener('broadcasts', async function () { | ||||
| core.register('onBroadcastsChanged', async function () { | ||||
| 	await tfrpc.rpc.set('broadcasts', await ssb.getBroadcasts()); | ||||
| }); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user