Commit graph

52 commits

Author SHA1 Message Date
poljar (Damir Jelić)
1e3e66e350 buffer: Remember which name we display in the buffer. 2018-07-06 15:39:37 +02:00
poljar (Damir Jelić)
66507b23ce buffer: Add a matrix specific buffer class. 2018-07-06 14:56:06 +02:00
poljar (Damir Jelić)
3c4888c1fb rooms: Handle invites. 2018-07-05 18:32:24 +02:00
poljar (Damir Jelić)
ca9b60cd34 server: More refactoring of the event handling (join/leave). 2018-07-05 17:02:01 +02:00
poljar (Damir Jelić)
24b412d73c matrix: Change the way the topic is changed. 2018-07-05 15:46:45 +02:00
poljar (Damir Jelić)
38d6a14a33 matrix: Change the way responses and events are executed. 2018-07-05 15:13:19 +02:00
poljar (Damir Jelić)
e6e996997f rooms: Encrypted events can be redacted as well. 2018-06-18 20:41:46 +02:00
poljar (Damir Jelić)
642e518464 encryption: Initial encrypted message sending support. 2018-05-11 13:03:42 +02:00
poljar (Damir Jelić)
1fd5bd637d encryption: Decrypt incomming messages. 2018-04-03 21:51:03 +02:00
Denis Kasak
629eba1335 Use wrapped weechat module instead of using it directly. 2018-03-23 10:21:22 +01:00
Denis Kasak
42f34f749b Handle combination of strikethrough and other attributes.
Strikethrough has to be done first, before handling any other attribute,
because otherwise it doesn't render correctly.

The following changes were made:

1. When striking due to redaction, we simply strip all the other
   attributes and then do the strikethrough, because this is the only
   practical option.
2. When rendering rich text received from the server, we ensure we
   handle strikethrough first, before any other attribute.
2018-03-23 09:51:58 +01:00
poljar (Damir Jelić)
2915e5d288 rooms: Don't create membership messages from the state dict. 2018-03-22 11:08:14 +01:00
poljar (Damir Jelić)
c967731c0f events: Make sync event execution batched. 2018-03-19 14:55:48 +01:00
poljar (Damir Jelić)
a724d7fe58 rooms: Fix join event message creation. 2018-03-19 14:55:48 +01:00
poljar (Damir Jelić)
ee321b21d9 rooms: Restructure room info handling. 2018-03-19 14:55:48 +01:00
poljar (Damir Jelić)
34bf4ad65e rooms: Refactor out the event parsing in RoomInfo. 2018-03-18 23:31:57 +01:00
Denis Kasak
02bb64feab Remove usage of old MatrixRoom.alias attribute in remaining places.
* Use calculated display name in the bar item.
* Don't mention the room name in topic messages for groups.
2018-03-12 12:05:42 +01:00
Denis Kasak
654e39077d Improve room names.
We now track the room ID, the canonical alias and the name of the room
separately. Only the room ID is guaranteed to be set (instead of `None`).

Additionally, a number of methods were added to MatrixRoom to assist in
calculating the name of the room and determining whether it is a named
room or an ad hoc "group" of users.

The most important method is `MatrixRoom.display_name` which calculates
the display name of the room (roughly) according to section 11.2.2.5[*] of
the Matrix v0.3.0 spec.

[*] https://matrix.org/docs/spec/client_server/r0.3.0.html#id268
2018-03-09 23:59:33 +01:00
Denis Kasak
cb8b589bc9 Fix handling of empty room names.
When room names that were previously set get deleted, the server still
returns the name key, but set to the value of an empty string. Handle
this case as if there is no room name.
2018-03-08 11:08:44 +01:00
poljar (Damir Jelić)
dc25487127 rooms: Add canonical alias event handling. 2018-03-06 17:17:54 +01:00
poljar (Damir Jelić)
e5b08f653a rooms: Don't use room aliases to change the buffer name. 2018-03-06 16:53:44 +01:00
poljar (Damir Jelić)
9a656d0432 rooms: Don't use event age, use their timestamp. 2018-03-06 16:53:04 +01:00
poljar (Damir Jelić)
51eb474477 rooms: Add more coloring to the membership messages. 2018-03-06 16:15:27 +01:00
poljar (Damir Jelić)
57718f82e9 rooms: Fix the nick in quit messages. 2018-03-06 16:02:46 +01:00
poljar (Damir Jelić)
a1b6087bf4 rooms: Print out membership events. 2018-03-06 15:52:30 +01:00
Denis Kasak
b0872922ec Implement /kick. 2018-03-06 09:36:22 +01:00
poljar (Damir Jelić)
a606ac088a Only put a prefix string if there is a prefix. 2018-02-28 21:29:15 +01:00
poljar (Damir Jelić)
92b35dfd8c Colorize the nicks when printing out messages. 2018-02-28 21:09:18 +01:00
poljar (Damir Jelić)
97dbda95a7 Fix membership parsing.
The spec requires the membership status to be inside of the content,
even though sometimes it's outside of it as well.
2018-02-28 19:40:16 +01:00
poljar (Damir Jelić)
0b5ceb8526 Another map that doesn't get executed in python3. 2018-02-28 18:30:10 +01:00
poljar (Damir Jelić)
01ad6e9d9a Handle notice messages. 2018-02-26 19:57:19 +01:00
poljar (Damir Jelić)
6db44525dc Abstract away unknown messages and emote messages. 2018-02-26 19:36:02 +01:00
poljar (Damir Jelić)
2b428ac132 Handle emote messages. 2018-02-26 19:22:54 +01:00
poljar (Damir Jelić)
13d70ae867 Handle media messages. 2018-02-26 18:21:40 +01:00
poljar (Damir Jelić)
15f814bee8 Add room encrytpion event. 2018-02-25 19:18:44 +01:00
poljar (Damir Jelić)
fb47b94252 Remove unused imports. 2018-02-25 18:53:42 +01:00
poljar (Damir Jelić)
d97323e7e8 Catch exceptions for room events and print out a error message. 2018-02-25 18:53:11 +01:00
poljar (Damir Jelić)
31fc14c27f Fix empty display name handling. 2018-02-25 18:52:55 +01:00
poljar (Damir Jelić)
9f70a1440b Remove room name printing from the room name event. 2018-02-25 18:01:23 +01:00
poljar (Damir Jelić)
bed3e1f5e6 Add name and aliases room event handling. 2018-02-25 16:34:55 +01:00
poljar (Damir Jelić)
0743bca542 Refactor the message modification in redactions. 2018-02-25 15:29:07 +01:00
poljar (Damir Jelić)
5791a48b3f Handle room redaction events. 2018-02-25 14:53:48 +01:00
poljar (Damir Jelić)
99bef42187 Set highlight_tags_restrict to the channel buffers. 2018-02-24 17:56:29 +01:00
poljar (Damir Jelić)
e0ca75b56a Handle room topic events. 2018-02-24 15:15:00 +01:00
poljar (Damir Jelić)
542b0bb5af Remove empty room events. 2018-02-24 10:24:19 +01:00
poljar (Damir Jelić)
add8df517c Add power level handling back. 2018-02-23 20:17:01 +01:00
poljar (Damir Jelić)
63e24d56dd Handle state events as well. 2018-02-23 18:57:35 +01:00
poljar (Damir Jelić)
28d379a428 Separate the membership events out.
We need to handle the membership events so we can populate the nicklist
and set nick colors before we print out any messages.
2018-02-23 18:53:39 +01:00
poljar (Damir Jelić)
e1723c528c Add membership handling to the room events. 2018-02-23 15:18:06 +01:00
poljar (Damir Jelić)
f98efe1ab9 Move room classes to rooms.py. 2018-02-22 21:50:50 +01:00