Conversation
for more information, see https://pre-commit.ci
gazpachoking
left a comment
There was a problem hiding this comment.
Looks pretty simple and good. Maybe tweak the room id name in config?
| All fields are required. | ||
|
|
||
| token: Is available in Element under Help/About. | ||
| roomId: Is available in Element under room settings. |
There was a problem hiding this comment.
Capitalization is different here than in actual usage. Maybe we want to standardize it to room_id everywhere?
| config['server'], | ||
| "_matrix/client/r0/rooms", | ||
| config['roomid'], | ||
| "send/m.room.message?access_token=" + config['token'], |
There was a problem hiding this comment.
probably should use
urllib.parse.urlencode(....)
There was a problem hiding this comment.
rllib.urljoin() takes from 2 to 3 positional arguments but 4 were required.
| try: | ||
| requests.post(room, json=notification) | ||
| except RequestException as e: | ||
| raise PluginWarning(e.args[0]) |
There was a problem hiding this comment.
use exception chaining
raise PluginWarning(...) from e
| logger = logger.bind(name=plugin_name) | ||
|
|
||
|
|
||
| def urljoin(*args): |
There was a problem hiding this comment.
why not just use standard urljoin ?
There was a problem hiding this comment.
urllib.urljoin() takes from 2 to 3 positional arguments but 4 were required.
|
Awesome, let's merge this in. Can you update the wiki too? I created the page at https://flexget.com/en/Plugins/Notifiers/matrix In case I have completed it, just proof-read it :) |
|
I've updated the wiki with instructions |
|
@antibios nice! I made some further formatting improvements to stay more consistent with other documentation thanks for contributing |
Motivation for changes:
Matrix is a secure msging platform that allows for updates via a REST call
Detailed changes:
Addition of matrix.py to the notifiers folder.
Addressed issues:
Implemented feature requests:
Config usage if relevant (new plugin or updated schema):
Log and/or tests output (preferably both):
To Do: