Commit graph

762 commits

Author SHA1 Message Date
poljar
b4a315b6fa
Merge pull request #8 from dkasak/master
Improve .gitignore
2018-03-19 10:26:14 +01:00
Denis Kasak
d239eda675 Improve .gitignore 2018-03-19 10:22:06 +01:00
poljar (Damir Jelić)
416e154359 Fix tests for python2. 2018-03-18 23:31:57 +01:00
poljar (Damir Jelić)
3eef4a2f8b Add more dummy weechat module functions. 2018-03-18 23:31:57 +01:00
poljar (Damir Jelić)
34bf4ad65e rooms: Refactor out the event parsing in RoomInfo. 2018-03-18 23:31:57 +01:00
poljar
f5a45bc8aa
Merge pull request #6 from dkasak/todo-updates
Update TODO.
2018-03-17 17:44:34 +01:00
Denis Kasak
8af88918a1 Update TODO. 2018-03-17 00:28:53 +01:00
poljar (Damir Jelić)
c9d953dc4d colors: Fix index out of range error for markdown style emph. 2018-03-12 19:53:27 +01:00
poljar
0df199fd6f
Merge pull request #5 from dkasak/proper-names-for-private-chats
Improve room names.
2018-03-12 13:35:20 +01:00
Denis Kasak
e70f1e6042 Pass missing argument to display_name. 2018-03-12 13:24:36 +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ć)
207fb44bdc colors: Add markdown style italics support. 2018-03-06 22:57:57 +01:00
poljar (Damir Jelić)
16a2215cfc utils: Rename age to timestamp in server_ts_to_weechat. 2018-03-06 17:18:30 +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
poljar (Damir Jelić)
996270df0d server: Only limit the sync if we don't have a next batch. 2018-03-06 13:53:34 +01:00
poljar (Damir Jelić)
01b8c44814 utils: Fix typo in tags formatting function. 2018-03-06 11:19:15 +01:00
Denis Kasak
b0872922ec Implement /kick. 2018-03-06 09:36:22 +01:00
Denis Kasak
7434285ffb Support weechat proxies. 2018-03-03 23:56:51 +01:00
poljar (Damir Jelić)
4a7b200ba4 utils: Align the user names in the nicklist. 2018-03-03 14:42:09 +01:00
Denis Kasak
d7485cc746 Always output HTML colors as hex codes. 2018-03-03 12:34:26 +01:00
Denis Kasak
8bb383220f Fix numbering comment for color "white". 2018-03-03 12:34:26 +01:00
Denis Kasak
cc993df68e Rename first_16 -> weechat_basic_colors. 2018-03-03 12:34:26 +01:00
Denis Kasak
59138a9824 if -> elif 2018-03-03 12:34:26 +01:00
Denis Kasak
c18c10774e Remove erroneously repeated condition. 2018-03-03 12:34:26 +01:00
Denis Kasak
f47e167023 Clarify help message for /redact. 2018-03-03 12:34:26 +01:00
Denis Kasak
86309740a0 Fix quotes in help message. 2018-03-03 12:34:26 +01:00
Denis Kasak
a73c887ee3 Some style changes to help/error messages. 2018-03-03 12:34:26 +01:00
Denis Kasak
23df2d4bcb Fix wording in error message. 2018-03-03 12:34:26 +01:00
Denis Kasak
7aa2927289 Fix command in examples. 2018-03-03 12:34:26 +01:00
poljar (Damir Jelić)
fc6a6e9da9 tests: Implement mock weechat module and add some color tests. 2018-03-02 22:59:43 +01:00
poljar (Damir Jelić)
404f785f21 Add TODO. 2018-03-01 21:03:36 +01:00
poljar (Damir Jelić)
d1869cd5d6 server: Store the device id.
The device id now gets saved and reused for logins.
2018-03-01 13:58:33 +01:00
poljar (Damir Jelić)
4fc5b8b41e colors: Produce email style quotes from html block quotes. 2018-03-01 11:56:38 +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ć)
0f08584744 Try to update the highlight status as well in the backlog event.
Updating the highlight status of a line currently isn't possible in
weechat. Hopefully future weechat versions will allow this.
2018-02-28 18:30:39 +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ć)
b2c5a003d2 Remove unused imports. 2018-02-28 15:55:12 +01:00
poljar (Damir Jelić)
8e43fe1533 Fix cert digest calculation under python3.
Openssl's digest function takes a byte string on python2 and a unicode
string on python3. Use bytes_to_native_str for this conversion.
2018-02-28 15:53:33 +01:00
poljar (Damir Jelić)
cd2788553c Use a for loop instead of map in the join info event.
map returns an iterator on python3, the function won't get executed
unless we ask for the result, since the function doesn't return a result
we'll use a for loop instead of complicating things unnecessarily.
2018-02-28 15:33:48 +01:00
poljar (Damir Jelić)
f247daf51d Print out certificate info. 2018-02-28 14:38:02 +01:00
poljar (Damir Jelić)
f9971ce443 Print out a message when logging in. 2018-02-27 19:56:02 +01:00