thunderbird / webext-experiments

WebExtension Experiments for Thunderbird
28 stars 12 forks source link

Chat APIs #1

Open freaktechnik opened 6 years ago

freaktechnik commented 6 years ago

There should be a namespace to interact with chat. The following is an old draft of mine of what that could look like:

APIs (ordered by namespaces)

That's about it for APIs. But as you will notice, nothing about themes, emote sets or new providers in there. That's because that should be statically declared in the manifest.json:

The provider API

Provider pages would essentially get some additional APIs to either build on top of an existing provider or build their own (and since TCP sockets are not exposed to extensions atm some socket would have to be exposed...) Not sure if some APIs should be restricted from here, so the socket part can run in its own thread and all the front-end stuff that doesn't actually need the socket would be forced to the classic extension background script and they could communicate by messaging. The exposed socket things would be classes that could be extended? Not sure. All the events from the other APIs should only be sent for changes coming from outside the provider, so the provicer can use the create, update and remove methods for UI changes.