Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental Matrix & Mattermost backends #23

Open
wants to merge 1 commit into
base: python3
Choose a base branch
from

Conversation

nim65s
Copy link
Member

@nim65s nim65s commented Sep 14, 2017

Hi,

Here are PoC for two other backends.

I just checked that the !date module works.

Mandatory XCKD: https://xkcd.com/1810/

@sleduc
Copy link
Member

sleduc commented Jul 16, 2019

Two questions about this PR (I am trying to add a new "backend" to pipobot, and I just remembered you did the same with other protocols :p).

Wouldn't it be better to move the "parse_mess" method from "pipobot.lib.modules" to the bot class itself ? This way the "module" implementation could remain protocol-independant.
I guess we just need to define a "generic interface" for what a "message" is (I guess a "body", a "sender", and a "type").
Or we could just do the parsing in the bot class, and then change the "signature" of "do_answer" in pipobot/lib/modules.py to take this "message" class instead of assuming it is a Jabber message.

Also I was wondering on how to be able to use one protocol without being "bothered" by other ones. Since in "pipobot/init.py" we import all bots variants (BotJabber, BotMattermost, ...), it means that even if you want to do just "jabber" with your bot, you will still need to have installed the python modules required to do "mattermost".

@nim65s
Copy link
Member Author

nim65s commented Jul 16, 2019

I think defining a "generic message" with body / sender / type should work.

And yes, I agree that the variants should be imported only if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants