Commit graph

762 commits

Author SHA1 Message Date
Tom Smeding
de1d3d4664 Make buffer name prefix a global constant 2020-07-02 17:27:20 +02:00
Tom Smeding
439389db4d Use G.SCRIPT_NAME for buffer name namespace prefix 2020-07-02 16:40:12 +02:00
Tom Smeding
00f5849500 Namespace buffers with "matrix."
This allows setting key bindings specifically for matrix buffers
2020-07-02 16:29:01 +02:00
Damir Jelić
cd90256e69 server: Always use the option initial sync events for the initial sync. 2020-06-22 19:42:08 +02:00
Damir Jelić
8b5ae9d80d server: Lower the sync limit. 2020-06-22 19:42:08 +02:00
Denis Kasak
71b7f79317 Make nick prefix (&, @, +) colour configurable. 2020-06-08 20:41:59 +02:00
Denis Kasak
72b0cd959b Fix heading level. 2020-06-08 20:41:59 +02:00
Denis Kasak
5532d2ad02 README: Add information about using go.py. 2020-06-08 20:41:59 +02:00
Tom Smeding
7fdd7eb910 Use URLs, not URL's 2020-06-08 20:41:59 +02:00
Tom Smeding
d37e08cce2 Don't process markdown in URL's 2020-06-08 20:41:59 +02:00
Denis Kasak
172826ea6b Improve wording of README section on typing notifications. 2020-06-07 14:44:32 +02:00
Denis Kasak
16825451c7 Fix nicklist grouping of users with the + prefix.
The wrong comparison operator was used. Most likely a leftover from when
the function used power levels directly.
2020-06-07 14:37:42 +02:00
Tom Smeding
397acef2bd Escape manually entered html characters
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.
2020-06-04 15:08:45 +02:00
Denis Kasak
126c55b3ea
Merge pull request #204 from tomsmeding/reply-quotes
Allow quotes in replied-to messages
2020-06-03 11:31:31 +00:00
Tom Smeding
a5e6434c31
Fix handling of backslashes in relation to code blocks (#203)
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.
2020-06-03 11:06:16 +00:00
Tom Smeding
d5636bd186 Require text in reply-matrix 2020-06-02 09:42:28 +02:00
Tom Smeding
6aff7ddcbb Escape quotes in reply/redact completion message hints 2020-06-02 09:41:35 +02:00
Denis Kasak
3cf5cc077e Update project status in the README. 2020-05-31 14:44:04 +02:00
Denis Kasak
5191b596f3 Allow mixing of code and colours with other attrs when outputting HTML. 2020-05-31 14:44:04 +02:00
Tom Smeding
170c5811a3
Better half-markdown (#202)
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.
2020-05-31 12:09:29 +00:00
Tom Smeding
0ce5b65835 Properly handle newlines in quote blocks 2020-05-29 21:29:44 +02:00
Tom Smeding
b4a3aabad9 Add quote_wrap option 2020-05-29 11:26:53 +02:00
Damir Jelić
e0ec1a87bb readme: Fix some grammar issue and remove trailing whitespace. 2020-05-24 21:31:42 +02:00
Damir Jelić
88f2537339 Merge branch 'patch-2' 2020-05-24 21:30:45 +02:00
evan
3ed0a04098 instructions for autoconnect/autoload 2020-05-23 17:20:00 -05:00
Damir Jelić
bd1583e2b7 Merge branch 'brew-libolm' 2020-05-23 11:30:26 +02:00
Joram Schrijver
efd4786996 server: fix typo in config callback error return 2020-05-23 00:51:59 +02:00
Jindřich Dítě
30ac475c5f
Update README - Arch libolm now Community, not AUR 2020-05-18 13:06:13 +02:00
Aaron Raimist
d6e214a729
Add instructions for installing libolm from Homebrew
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2020-05-16 12:59:50 -05:00
Damir Jelić
427cb9f0be Merge branch 'rudis-master' 2020-05-13 17:07:11 +02:00
Damir Jelić
06d04b5152 Merge branch 'feat/enable-replies' 2020-05-13 17:06:54 +02:00
Simon Ruderich
87d8032070 Fix typos in messages and comments 2020-05-13 08:28:37 +02:00
Imran Iqbal
af7049f2cf
feat(replies): enable based on redaction implementation
* Close #86
* https://matrix.org/docs/spec/client_server/latest#rich-replies
* Modify to `/reply-matrix` to avoid clash with `/reply` used by `wee-slack`
2020-05-10 17:47:56 +01:00
Imran Iqbal
da23da659b
ci(travis): clear Build config validation items & general refresh
* https://travis-ci.org/github/poljar/weechat-matrix/builds/685282618/config

```
Build config validation

root: deprecated key sudo (The key `sudo` has no effect anymore.)
root: missing os, using the default linux
```
2020-05-10 17:15:47 +01:00
Damir Jelić
196e66f74a Merge branch 'pr/olm_missing_category' 2020-05-10 10:19:51 +02:00
Damir Jelić
d750d3ba1f Merge branch 'pr/olm_verification_msg_args' 2020-05-10 10:12:15 +02:00
Qeole
5889d50a0d commands: prevent python crash when typing simply "/olm"
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.")
2020-05-10 01:29:44 +01:00
Qeole
9fcf1af922 commands: fix user/device ids in error messages for "/olm verification"
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.")
2020-05-10 01:25:29 +01:00
Imran Iqbal
b74b8e089d
fix(commands.py): fix minor typo diconnected => disconnected 2020-05-09 14:09:28 +01:00
Adrijaned
d415841662
Added clarification on instalation of helper scripts
It might be easy to miss that you can't have them installed with the suffix, and then causes errors alike #83
2020-04-07 11:11:45 +02:00
Damir Jelić
950d912c82 main: Bump the version in the script as well. 2020-04-04 14:50:34 +02:00
Damir Jelić
834c11e295 pyproject.toml: Set the Python version to 3.6 and up. 2020-03-31 19:06:23 +02:00
Damir Jelić
6cde9166bd pyproject.toml: Set the package format to sdist for the contrib scripts. 2020-03-31 19:05:58 +02:00
Jonas Witschel
18defb8301 pyproject.toml: make python-magic, aiohttp and requests optional
These dependencies are only required for the contrib scripts, so they
don't need to be installed for the main WeeChat script.
2020-03-30 22:46:14 +02:00
Jonas Witschel
ef59293515 pyproject.toml: fix invalid Python version restriction
Using environment markers in the version is not allowed
(https://github.com/python-poetry/poetry/issues/21).
2020-03-30 22:45:20 +02:00
Damir Jelić
2a24096505 requirements: Fix the nio requirement. 2020-03-29 13:23:12 +02:00
Damir Jelić
5ba5948eee pytproject.toml: Bump the version and switch back to the latest nio. 2020-03-29 13:13:14 +02:00
Damir Jelić
65a5db7291 travis: Remove Python 2 from the tests. 2020-03-29 12:45:25 +02:00
Damir Jelić
7f285d250e pytroject.toml: Add the e2e feature of nio as a requirement. 2020-03-29 12:44:44 +02:00
Johannes Visintini
61ccf1ca8d
matrix-nio == 0.6
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.
2020-03-23 00:52:19 +01:00