Dennis
57499db3f5
This commit includes the matrix bot API (https://github.com/shawnanastasio/python-matrix-bot-api/) and the first proof of concept that the plugin API works. Furthermore, it includes the first version of a plugin that acquires event from an Admidio setup (https://admidio.org).
14 lines
456 B
Python
14 lines
456 B
Python
"""
|
|
Defines a Matrix bot message handler
|
|
"""
|
|
|
|
|
|
class MHandler(object):
|
|
# test_callback - function that takes a room and event and returns a boolean
|
|
# indicating whether we should pass the message on to handle_callback
|
|
#
|
|
# handle_callback - function that takes a room and event and handles them
|
|
def __init__(self, test_callback, handle_callback):
|
|
self.test_callback = test_callback
|
|
self.handle_callback = handle_callback
|