Skip to content

Add plugin support #66

@jt3k

Description

@jt3k

It would be great if the chat-linker could support the plug-ins.

This would make it easier to add functionality, for example anti-spam or anti-obscene-swearing.

At the first stage, I would like to see a synchronous or asynchronous middleware.
For example, as it is done in axios interceptors or babel-plugin

plugin example:

module.exports = ({
 interceptors: [
  {
   from: 'telegram', // or from: '*'
   to: 'xmpp',
   interceptor({ network, name, message, room }) {
    // message processing here
    return { network, name, message, room }
   }
  }
 ]
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions