Previously, the behaviour was inconsistent; if there was no other
formatting, weechat-matrix doesn't send formatted_body, and Riot would
display the message as-is. If there _was_ other formatting,
formatted_body is sent without escaping of the HTML characters, so that
Riot would interpret them as HTML.
This makes both cases consistent, using the first behaviour.
Backslashes are now correctly preserved inside code blocks while still allowing the user to escape a backtick. The handling of backticks and bold/italic wrappers was unified so that they share the same escaping code.
Backslashes only escape Markdown wrapper characters (*, _, `). If they are encountered before another character, they are considered literal.
Better half-markdown.
This fixes some issues with the current semi-markdown-parser to make life easier until a full markdown parser is implemented.
Changes:
- A * that would normally start italics but isn't matched by a closing *, is now left alone.
- A ` that would normally start a code block but isn't matched by a closing `, is now left alone.
- Backslashes should work as expected.
- Support for **bold** and the alternative _italic_ style.
Typing "/olm" on its own is supposed to fall back to the default
subcommand "/olm info private". It does pick up "info", but fails to
find a "category" (in our case: we want "private") because the category
has never been parsed, and has never been assigned to "args". Not only
does the command fail, but it even yields a traceback:
python : stdout/stderr (matrix) : Traceback (most recent call last):
python : stdout/stderr (matrix) : File "/home/qmo/weechat/conf/python/matrix/utf.py", line 89, in wrapper
python : stdout/stderr (matrix) : return function(*args, **kwargs)
python : stdout/stderr (matrix) : File "/home/qmo/weechat/conf/python/matrix/commands.py", line 891, in matrix_olm_command_cb
python : stdout/stderr (matrix) : return command(server, data, buffer, args)
python : stdout/stderr (matrix) : File "/home/qmo/weechat/conf/python/matrix/commands.py", line 860, in command
python : stdout/stderr (matrix) : olm_info_command(server, parsed_args)
python : stdout/stderr (matrix) : File "/home/qmo/weechat/conf/python/matrix/commands.py", line 594, in olm_info_command
python : stdout/stderr (matrix) : if args.category == "private":
python : stdout/stderr (matrix) : AttributeError: 'Namespace' object has no attribute 'category'
Fix it by going for "private" if no category has been assigned.
Fixes: 1208c9d4a2 ("commands: Add initial olm command.")
When passing arguments to format error messages for "/olm verification",
the order of device id and user id has been swapped, leading to
confusing messages. Let's restore the correct order.
Fixes: 9f01a05617 ("commands: Add a command for interactive key verification.")
If nio 0.9 is installed, the build fails for python 2.7. Unfortunately you're not able to change the used python version in weechat. This change should stay until all stable systems are using python3 as default.
This fixes#124
This moves to installing dependencies from pip instead of system
packages, it moves the base docker image forward a release, and sets
weechat to run as a user instead of root.