Commit graph

769 commits

Author SHA1 Message Date
Tom Smeding
91b42e8671 Fix test hypothesis precondition 2020-08-29 20:19:01 +02:00
Tom Smeding
73e9d1d9d3 Use True as default value for markdown_input in tests 2020-08-29 20:18:56 +02:00
Tom Smeding
e74a5a2041 Toggle markdown parsing with matrix.look.markdown_input 2020-08-25 22:31:57 +02:00
Damir Jelić
2b21c0cb5c Merge branch 'cursor-reply' 2020-07-06 20:50:31 +02:00
Marco Sirabella
2171be802f
Introduce INSTALLDIR directory for DRY 2020-07-03 09:46:11 -04:00
Marco Sirabella
cbf188cd3d
Have directory be created first in makefile install rules
See: https://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
2020-07-03 09:42:33 -04:00
Tom Smeding
fab8bb37bf Reply to messages with 'r' binding in cursor mode 2020-07-02 17:51:18 +02:00
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