added a few todo's
This commit is contained in:
parent
86a89c7d44
commit
419c890502
|
@ -44,6 +44,7 @@ class MatrixModule(BotModule):
|
||||||
async def matrix_message(self, bot, room, event):
|
async def matrix_message(self, bot, room, event):
|
||||||
|
|
||||||
# todo: add subcommand to add administrators
|
# todo: add subcommand to add administrators
|
||||||
|
# todo: add subcommand to add known matterbridge bot
|
||||||
# todo: needs a mechanism to hook into admin check of the bot
|
# todo: needs a mechanism to hook into admin check of the bot
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -60,6 +61,10 @@ class MatrixModule(BotModule):
|
||||||
bot.remove_callback(self.dispatch_cb)
|
bot.remove_callback(self.dispatch_cb)
|
||||||
|
|
||||||
async def dispatch_cb(self, room, event):
|
async def dispatch_cb(self, room, event):
|
||||||
|
|
||||||
|
# todo: only accept messages from matterbridge bot
|
||||||
|
# like event.sender in self.known_matterbridge_bots
|
||||||
|
|
||||||
# no content at all?
|
# no content at all?
|
||||||
if len(event.body) < 1:
|
if len(event.body) < 1:
|
||||||
return
|
return
|
||||||
|
@ -69,7 +74,7 @@ class MatrixModule(BotModule):
|
||||||
if matter_message is None:
|
if matter_message is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.logger.info(f"room: {room.name} - dispatch matterbridge message to bot")
|
self.logger.info(f"room: {room.name} protocol: {matter_message.protocol} user: {matter_message.username} - dispatch matterbridge message to bot")
|
||||||
|
|
||||||
# dispatch. changing the body of the event triggers message_cb of the bot
|
# dispatch. changing the body of the event triggers message_cb of the bot
|
||||||
event.body = matter_message.message
|
event.body = matter_message.message
|
||||||
|
|
Loading…
Reference in New Issue