Commit graph

440 commits

Author SHA1 Message Date
f35b3d16a3 Also reload plugins configuration on /reload
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-08 23:21:09 +02:00
Emmanuel Gil Peyrot
07e13a1220 Fix loading plugins. 2018-07-08 11:02:17 +02:00
Emmanuel Gil Peyrot
19cc6229a2 logger: Use pathlib.Path.open() instead of open(). 2018-07-08 10:58:00 +02:00
Emmanuel Gil Peyrot
cabc8fcd94 config: Use pathlib.Path.open() instead of open(). 2018-07-08 10:56:59 +02:00
Emmanuel Gil Peyrot
b3a944c76b config: Replace the config file with its new version, rather than copy2/remove. 2018-07-08 10:56:45 +02:00
Emmanuel Gil Peyrot
1707b14691 tabs.rostertab: Use Path for file completion. 2018-07-08 09:53:15 +02:00
Emmanuel Gil Peyrot
150feda3f0 core.commands: Remove implicit conversion from Path to str in /set. 2018-07-08 09:52:28 +02:00
Emmanuel Gil Peyrot
78d41b4989 plugin: Use the provided pathlib.Path. 2018-07-08 09:23:52 +02:00
Emmanuel Gil Peyrot
fe6c8041a1 Add some more str() on Paths… 2018-07-08 09:18:36 +02:00
Emmanuel Gil Peyrot
9dd38bd840 Add a few more str() on pathlib.Path objects. 2018-07-05 16:32:38 +02:00
Emmanuel Gil Peyrot
fcaaa6ef49 Add a bunch of str() to convert pathlib.Path into str. 2018-07-05 16:28:44 +02:00
Emmanuel Gil Peyrot
142180204b logger: Fix a typo when creating the logs directory. 2018-07-05 16:21:13 +02:00
Emmanuel Gil Peyrot
91d22aacba core.handlers: Correctly import get_image_cache() from poezio.config. 2018-07-05 16:19:03 +02:00
Emmanuel Gil Peyrot
c66ae524be config: Pass a str rather than a Path to RawConfigParser, fixes Python 3.5 support. 2018-07-05 12:25:39 +02:00
Emmanuel Gil Peyrot
5c1dc0006f config: Stop using os.path to split pathlib.Path objects. 2018-07-05 12:24:36 +02:00
Emmanuel Gil Peyrot
60f21c0df4 Factorise FIFO filename creation. 2018-07-04 13:30:32 +02:00
Emmanuel Gil Peyrot
1da74a9636 Simplify plugins path changes. 2018-07-04 13:28:13 +02:00
Emmanuel Gil Peyrot
c162596f00 plugin_manager: Add back forgotten self. 2018-07-04 13:15:23 +02:00
Emmanuel Gil Peyrot
ccb2ea0ea4 config: remove check_create_log_dir(). 2018-07-04 13:14:17 +02:00
Emmanuel Gil Peyrot
c4d9dd48ed logger: Use LOG_DIR being a pathlib.Path rather than a string, remove os. 2018-07-04 13:11:24 +02:00
Emmanuel Gil Peyrot
09dbd9f5f2 Remove the data_dir option, and replace it with XDG_DATA_HOME. 2018-07-04 13:07:04 +02:00
Emmanuel Gil Peyrot
d41bfa1c57 Replace config.CACHE_DIR with xdg.CACHE_HOME. 2018-07-04 12:47:02 +02:00
Emmanuel Gil Peyrot
35495fba60 a 2018-07-04 12:43:46 +02:00
Emmanuel Gil Peyrot
84107bdd77 Factorise retrieving tmp_image_dir. 2018-07-04 12:33:38 +02:00
Emmanuel Gil Peyrot
60ba8308fa xhtml: Simplify tmp_dir/extract_images into a single Option<str> parameter. 2018-07-04 12:25:41 +02:00
Emmanuel Gil Peyrot
f0ad4b348b Use pathlib.Path and poezio.xdg to load themes. 2018-07-04 12:07:31 +02:00
Emmanuel Gil Peyrot
7b8871b651 Use pathlib.Path and poezio.xdg to complete themes. 2018-07-04 12:07:31 +02:00
Emmanuel Gil Peyrot
da12fe7d6a Move XDG basedir functions to the poezio.xdg module. 2018-07-04 12:07:31 +02:00
Emmanuel Gil Peyrot
7978481edf Use the new config.get_default_config_dir() in plugin_manager. 2018-07-03 12:41:02 +02:00
Emmanuel Gil Peyrot
b80bb2fcfc Only create the config dir after parsing the CLI args.
This also switches to pathlib.Path instead of os.path for path
manipulation.
2018-07-03 12:32:37 +02:00
Emmanuel Gil Peyrot
5483cd40ee Switch from @asyncio.coroutine to async def everywhere. 2018-07-02 01:55:34 +02:00
Link Mauve
29b10b6c2b Merge branch 'information_popup' into 'master'
Replace information_popup_type_filter occurences with correct naming

See merge request poezio/poezio!4
2018-07-01 18:30:15 +02:00
b072c1390b
Replace information_popup_type_filter occurences with correct naming
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2018-07-01 01:09:45 +01:00
Emmanuel Gil Peyrot
01a4920bc8 Factorise code in logger. 2018-06-28 16:48:38 +02:00
Emmanuel Gil Peyrot
fbe376b6db Reintroduce the concept of resource, but named device_id and generated. 2018-06-28 15:09:02 +02:00
Emmanuel Gil Peyrot
7b3a116d76 Replace the '%s' % var pattern with str(var). 2018-06-28 14:49:54 +02:00
Emmanuel Gil Peyrot
e846825fc8 Add a check for Unicode support.
This makes poezio refuse to run if the environment is known broken.
2018-06-07 14:42:14 +02:00
Georg Lukas
0319ce5079
MUC-PM: bare-JID messages can't be PMs 2018-05-31 23:46:58 +02:00
louiz’
25df5ef410 Merge remote-tracking branch 'lab/master' 2018-05-23 19:40:40 +02:00
Emmanuel Gil Peyrot
76b6d414e5 Fix traceback introduced in aa816640a8. 2018-05-22 12:01:39 +02:00
Emmanuel Gil Peyrot
aa816640a8 Cancel a paused chatstate after 30s. 2018-05-16 14:00:52 +02:00
a1c3656788 config: Add DATA_DIR global constant 2018-05-14 16:40:13 +02:00
Emmanuel Gil Peyrot
9753b302c1 config: Reject relative XDG basedir paths. 2018-05-14 13:08:32 +02:00
Emmanuel Gil Peyrot
e9cd559cf0 config: Use lowercase for local variables. 2018-05-14 13:02:32 +02:00
a402bcefd3 Fetch all MUC history on first join 2018-04-25 12:03:26 +02:00
Georg Lukas
b7e1db4879 Sent Carbon: handle MUC-PMs properly. Fix #3294 2018-04-01 11:06:25 +02:00
Georg Lukas
4e9f8e2edb MUC-PM handler: support 'sent' messages (for Carbons) 2018-04-01 11:06:25 +02:00
Emmanuel Gil Peyrot
4e5a1c6581 Remove unused import. 2018-03-31 01:00:59 +02:00
Emmanuel Gil Peyrot
a2ad4af79a Use slixmpp’s new cache module for avatars too. 2018-03-31 00:47:24 +02:00
Emmanuel Gil Peyrot
b03a92e7ea Use the new slixmpp filesystem cache to store caps. 2018-03-31 00:28:09 +02:00
Emmanuel Gil Peyrot
326de0f161 Factorise the /version callback and make it handle errors
Fixes #3376.
2018-03-14 17:18:46 +01:00
Emmanuel Gil Peyrot
ae172f84dd Add a “name” column to /bookmarks. 2018-03-12 08:33:31 +01:00
Emmanuel Gil Peyrot
a468e16140 Add HTTP File Upload support. 2018-03-08 15:04:59 +01:00
mathieui
ac6adbf21b
Update documentation (& formatting)
- nick colors are not random by default
- /close is a useful command
2018-02-20 21:52:55 +01:00
mathieui
87ed4aff12
Fix the nick conflict code
also yapf -rip
2018-02-11 19:53:38 +01:00
mathieui
957ee8084d
Remove the """smart""" command completion 2018-02-11 17:58:00 +01:00
Emmanuel Gil Peyrot
a9e2a0177b Use refresh_input in core.information() to avoid traceback. 2018-01-25 21:37:40 +01:00
Emmanuel Gil Peyrot
25898e9ee7 Check that avatar sha1 is consistent with the hash. 2018-01-25 16:00:33 +01:00
Emmanuel Gil Peyrot
4c2eee6a13 Fix caching newer avatars. 2018-01-25 15:42:51 +01:00
Emmanuel Gil Peyrot
e61d5fd947 Optimise the half-block codepath slightly. 2018-01-25 15:02:40 +01:00
Emmanuel Gil Peyrot
8076c1d094 Fix blinking in ImageWin.
Also display the border according to the theme.
2018-01-25 14:51:18 +01:00
Emmanuel Gil Peyrot
5feb718706 Use full-blocks by default for images.
This prevents bugs in some terminals.
2018-01-25 14:50:35 +01:00
3e3793b701 Use refresh_input in process_presence_buffer to avoid traceback 2018-01-16 11:52:09 +01:00
mathieui
322e10d1bd
yapf -rip 2018-01-16 00:10:35 +01:00
mathieui
323b77c2f4
Current tab input is refreshed on kick/ban even when it does not exist
leading to tracebacks and shenanigans
2018-01-16 00:05:02 +01:00
mathieui
020c7db1ae Fix binary opening 2018-01-14 23:16:25 +01:00
mathieui
12ede4d301
yapf -ir 2018-01-13 15:33:19 +01:00
mathieui
6fe2f20833
Enforce HOME, TERM, and PATH env vars when running
Instead of showing an ugly traceback
2018-01-13 15:31:10 +01:00
mathieui
391eb27964
Open and write logs and config files in utf-8 2018-01-13 15:29:23 +01:00
Emmanuel Gil Peyrot
b981327df5 Fix typos, thanks codespell! 2018-01-10 02:13:35 +01:00
mathieui
15c5d7822a
Fix #3354 (wrong formatting for /code messages)
Acks were asked for and received, but /xhtml was bad
2017-12-27 20:37:52 +01:00
mathieui
fbb0f8d8a6
Fix #3361 (/correct [tab][tab] breaks the line) 2017-12-27 20:28:29 +01:00
mathieui
03a2e21ed7
Do not show a message as bounced if it was acked by a client
Fixes #3365
2017-12-27 20:16:50 +01:00
mathieui
dd33ce58dc
Set bookmark_on_join default value to false
too many pitfalls
2017-12-20 19:04:48 +01:00
mathieui
1a1164b9b1
Do not use the /join interface on nickname conflict
Therefore do not add bookmarks while doing this, it is wrong.
2017-11-28 22:29:37 +01:00
Jonas Wielicki
4edf40c3bb XEP-0392 MUC: re-color users on nickname change 2017-11-28 19:03:12 +01:00
Jonas Wielicki
2ac65137aa XEP-0392 MUC: Base User color solely on nickname 2017-11-26 13:36:00 +01:00
Emmanuel Gil Peyrot
1edabb0c77 Remove bogus checks for resource features. 2017-11-24 03:28:02 +00:00
Emmanuel Gil Peyrot
068aa591e3 config: Switch the default for show_muc_jid from True to False. 2017-11-24 03:07:17 +00:00
Emmanuel Gil Peyrot
e629cb5f94 bookmarks: Set the bookmark name to the localpart. 2017-11-24 03:06:56 +00:00
Emmanuel Gil Peyrot
b355098b4b muctab: Display the bookmark name when available, instead of the localpart. 2017-11-24 03:06:22 +00:00
Emmanuel Gil Peyrot
eae2692647 Update the documentation to reflect the removal of features. 2017-11-23 20:11:14 +00:00
Emmanuel Gil Peyrot
304d1cc1ab Remove all remote_wants_chatstates logic, keep the stubs. 2017-11-23 20:05:31 +00:00
Emmanuel Gil Peyrot
d9129c9ced Remove resource locking in DynamicConversationTab. 2017-11-23 20:00:22 +00:00
Emmanuel Gil Peyrot
3bc33935d2 Include MUCs in /presence autocompletion.
Fixes #3347.
2017-11-23 18:29:06 +00:00
Emmanuel Gil Peyrot
b705aba4e2 Add an autojoined bookmark on /join. 2017-11-23 17:55:54 +00:00
mathieui
5f5cc186dc
Fix the case when we receive an unavailable presence while joining 2017-11-22 21:19:27 +01:00
mathieui
057f7ac9f5
Refactor logger.py to make it more testable
Also fixes:
- release the message log mmap when we are done with it
- Write the right character in log lines
2017-11-21 22:40:43 +01:00
mathieui
156d170d13
Make italics work 2017-11-14 19:23:35 +01:00
Emmanuel Gil Peyrot
bd7b52988c yapf -ir 2017-11-14 12:13:03 +00:00
Georg Lukas
395435c68d self-ping: add 'timeout' option for ping response 2017-11-14 11:55:54 +00:00
Georg Lukas
0ee4bb6129 self-ping: rename option from 'delay' to 'interval' 2017-11-14 11:55:11 +00:00
Emmanuel Gil Peyrot
a278ee2a8c Replace italics with reversed when the curses module is too old to support it. 2017-11-12 16:46:28 +00:00
Jonas Wielicki
a67b1d4eb0 Move definition of CCG_PALETTE to Theme object 2017-11-12 17:33:58 +01:00
Jonas Wielicki
6f1b7eb46e Fix ranges for ncurses to rgb conversion 2017-11-12 17:13:51 +01:00
Jonas Wielicki
7e576941ca Add support for XEP-0392 (Consistent Color Generation) 2017-11-12 15:32:32 +01:00
mathieui
3db74303ea
Remove unused variables 2017-11-12 15:24:29 +01:00
mathieui
0634add327
Fix list alignment in theming.py 2017-11-12 15:12:12 +01:00
mathieui
d55cc58725
yapf -ir 2017-11-12 15:03:09 +01:00
mathieui
92496db823
Fix the bookmarks management window 2017-11-12 13:56:04 +01:00
Kim Alvefur
9ba50cb7ed Include the JID blocked instead of "Contact"
It's useful to see what JID you blocked.
Any JID can be blocked, so "Contact" isn't always accurate.
2017-10-23 18:53:44 +01:00
Emmanuel Gil Peyrot
af73b413eb Check whether curses.A_ITALIC exists, fixes a traceback on <em/> on Python < 3.7. 2017-10-18 15:26:06 +01:00
mathieui
9844f288de
Always refresh the MUC when setting or unsetting a user color
Fixes #3213
2017-10-15 14:09:40 +02:00
mathieui
db69afc171
Fix #3316 (normal private messages in MUC do not open a private tab) 2017-10-14 22:07:17 +02:00
mathieui
74ba7a85e6
Fix a traceback when creating a conversation tab 2017-10-14 21:42:44 +02:00
Emmanuel Gil Peyrot
16bdfdfe81 Add support for italic on ^Ci.
Fixes #2722.
2017-10-14 18:43:26 +01:00
Emmanuel Gil Peyrot
256119a574 Add an option to disable CSS parsing.
Fixes #3340.
2017-10-14 18:26:58 +01:00
mathieui
8af1a39d7e Add a refresh wrapper on the methods for scrolling the userlist 2017-10-14 16:45:31 +02:00
mathieui
fc6f2f2bf7 Use _ for unused arguments in tuple assignment 2017-10-14 16:38:07 +02:00
mathieui
1c43683275 Fix a bad indentation 2017-10-14 16:34:50 +02:00
mathieui
514434f446 Make remaining log.error/debug lazy 2017-10-14 16:33:24 +02:00
mathieui
9d261c902f Remove use of deprecated base64.encodestring method 2017-10-14 16:30:54 +02:00
mathieui
e7d8d2aaf5 Do not call poezio commands when we can call methods 2017-10-14 16:13:53 +02:00
mathieui
426dd35b94 Split the muctab recolor code 2017-10-14 16:13:42 +02:00
mathieui
7a0fcf855e Split command_topic in muctab 2017-10-14 16:01:53 +02:00
mathieui
67b850096e Split command_info in muctab 2017-10-14 15:55:53 +02:00
mathieui
a2440a8b21 Fix error presence handling 2017-10-14 15:45:36 +02:00
mathieui
9eb4b29d24 Refactor nick and affiliation changes
(and fix some small bugs that went unnoticed for years)
2017-10-14 15:45:36 +02:00
mathieui
6012bca6d0 Reformat muctab 2017-10-14 13:30:48 +02:00
mathieui
c2e0bcf735 Remove unused is_muc property 2017-10-14 13:09:35 +02:00
mathieui
225f300ef3 Remove some unused imports 2017-10-14 13:00:42 +02:00
mathieui
3b5e396469 Split command declaration from init in muctab
Make it slightly more declarative and readable (and longer), and put
it at the end of the file.
2017-10-14 12:54:49 +02:00
mathieui
cee802b6ef Fix the last pylint error (do not set the roster contact filter to None) 2017-10-13 23:15:03 +02:00
mathieui
858e333279 Clean the presence buffer whenever we leave the room 2017-10-13 19:04:19 +02:00
mathieui
bacbd835eb Fix more pylint errors 2017-10-13 01:18:22 +02:00
mathieui
69f29969ad Improve some bare or redundant excepts 2017-10-13 00:47:21 +02:00
mathieui
bbfb834827 Stop /win at the first tab found 2017-10-13 00:39:13 +02:00
6626208983 Change tab search behavior to select first matching tab, and cycle back the list. 2017-10-13 00:07:06 +02:00
mathieui
3317604c65 Fix some excepts (bare, useless, unused) 2017-10-12 01:23:40 +02:00
mathieui
b29b70da0f Set a default (noop) callback for Input.on_input instead of None 2017-10-12 01:09:45 +02:00
mathieui
39319d4937 Actually fix what the previous commit should have fixed 2017-10-12 00:07:01 +02:00
mathieui
621b966528 Fix a pylint complaint 2017-10-12 00:01:41 +02:00
mathieui
dd8037faa5 Rename the self-command function to self_ and keep language semantics
Sorry Link Mauve
2017-10-11 23:47:57 +02:00
mathieui
2b0062a279 Handle PresenceError correctly 2017-10-11 23:47:10 +02:00
mathieui
38a0e614d4 Narrow the scope of a try/except 2017-10-11 23:41:32 +02:00
mathieui
9a7c2c2136 Fix #3338 (cycle tabs with /w foo instead of picking the first) 2017-10-11 23:34:32 +02:00
mathieui
88903095c7 Fix #3339 (pure python poopt fails on multiline messages) 2017-10-11 23:07:17 +02:00
mathieui
bde9b31184 Set enable_avatars to false until the colors issue is fixed 2017-10-11 00:14:45 +02:00
mathieui
f61d46b061 Avoid an exception when we receive a presence from unknown nicks
add a log because it should not happen
2017-10-10 23:29:17 +02:00
mathieui
ef84a109e8 Fix #3190 (TOFU the SPKI hash and not the whole cert)
Makes letsencrypt renewals more pleasant.
Thanks jonasw and aioxmpp for the ASN.1 wizardry
2017-10-10 00:52:44 +02:00
mathieui
dcdc970acd Micro-optimize MUC presence handling
Keep all presence before status code=110 in a buffer, then batch-process
them when receiving our initial join.
2017-10-10 00:22:09 +02:00
Emmanuel Gil Peyrot
68e3cdcd49 Fix resize in some unknown condition, thanks eijebong. 2017-10-09 17:09:15 +01:00
Georg Lukas
88ae8a68a2 Properly use ellipsis in #3293 2017-10-09 08:06:45 +01:00
mathieui
3b5ea1a961 Fix #3322 (send a beep when we get disconnected) 2017-10-09 01:06:53 +02:00
mathieui
156cfb5546 Fix #3056 (send inactive chatstate when leaving a tab) 2017-10-08 21:30:11 +02:00
Emmanuel Gil Peyrot
46487bed32 rostertab: Increase the size of the contact_info and avatar. 2017-10-08 19:40:25 +01:00
mathieui
f59fcc12ef Fix #3257 (print cert hashes after validating the dialog) 2017-10-08 20:33:54 +02:00
mathieui
ff0095b44f Fix #3336 (be clearer on "unbound" meaning) 2017-10-08 20:05:53 +02:00
mathieui
d70988b151 Fix #3293 (provide detailed presence in status line)
Less eye travel for short statuses.
(patch from Ge0rG)
2017-10-08 19:57:07 +02:00
mathieui
83ced76bb1 Fix #3281 (alias /subject to /topic) 2017-10-08 19:53:39 +02:00