Skip to content
Discussion options

You must be logged in to vote

OpenACP has a plugin system for creating custom adapters (e.g. WhatsApp, Matrix, Line, etc.).

What is a plugin: An npm package that exports an AdapterFactory interface:

interface AdapterFactory {
  name: string;
  createAdapter(core: OpenACPCore, config: ChannelConfig): ChannelAdapter;
}

The plugin must export adapterFactory or a default export conforming to this interface.

How to create a plugin:

  1. Create a new npm package
  2. Implement the ChannelAdapter abstract class (handles sendMessage, sendPermissionRequest, sendNotification, session thread creation)
  3. Export an AdapterFactory with a createAdapter() method
  4. Publish to npm

How to install a plugin:

openacp install <package-name>    # Instal…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 0xMag1ci4n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants