Commit Graph

219 Commits

Author SHA1 Message Date
Philipp Hörist 31d9b39744 Deal with stanza-id not added by a mam archive
Fixes #9550
2019-01-19 21:35:58 +01:00
Philipp Hörist 3e362874be Detect invalid user activity 2019-01-19 21:21:20 +01:00
Philipp Hörist 7c7df9d4a4 Detect invalid user mood
Fixes #9546, #9547
2019-01-19 21:21:16 +01:00
Philipp Hörist b22f1baca5 Propagate presences further
Other modules like avatars and entity caps come after the base presence handlers
2019-01-11 20:45:11 +01:00
Philipp Hörist dad671c1c7 Remove unused import 2019-01-07 23:52:51 +01:00
Philipp Hörist 4f3e4d2242 Pass xml:lang to nbxmpp 2019-01-07 23:44:51 +01:00
Philipp Hörist 5776d3de48 Chatstates: Add more log output 2019-01-06 11:23:30 +01:00
Philipp Hörist 6a958c5725 Pass contact instead of string
Fixes #9529
2019-01-06 11:10:07 +01:00
Philipp Hörist a64d986c7f Fix pylint error 2019-01-06 02:15:17 +01:00
Philipp Hörist eb99291d44 Add chat state setting per room
- Add menu option to the group chat menu for setting the chat state
- Up the paused timer to 10 seconds
- Default for group chats is composing only
2019-01-06 02:01:12 +01:00
Philipp Hörist 777b8d72e4 Remove print statement 2019-01-06 00:58:07 +01:00
Philipp Hörist 55694b60bf Dont save Gajim settings in bookmarks
- Remove print status from bookmarks
- Remove minimize on join from bookmarks
- Add options to the groupchat menu for both settings

Fixes #9463
2019-01-06 00:00:42 +01:00
Philipp Hörist 633795b7f4 Dont fail on users leaving a group chat
Fixes #9527
2019-01-05 19:17:34 +01:00
Philipp Hörist 4aca2eeae2 Dont send chatstates when cycling MUC nicks
- Add ability to enable/disable the whole module so it doesnt try to send chatstates when we are offline
2019-01-04 15:21:55 +01:00
Philipp Hörist 5fd1e7b4bf Remove ping timeout on disconnect handler 2019-01-04 00:49:59 +01:00
Philipp Hörist b600328639 Refactor message handlers
- Adapt to nbxmpp now unwraping MAM messages
- Use nbxmpp properties
- Save message-id to database
2019-01-04 00:11:28 +01:00
Philipp Hörist cdb37828e4 Move message error handler into message module 2019-01-03 11:52:26 +01:00
Philipp Hörist c0fb645309 Move MUC message logging into message module 2019-01-03 11:25:45 +01:00
Philipp Hörist 0441ccd4e9 Move 'agent-removed' handler into Gateway module 2019-01-03 10:19:29 +01:00
Philipp Hörist fcb33a10e7 Add missing get_instance() for Gateway/IQ module 2019-01-03 01:00:31 +01:00
Philipp Hörist 9ae6654dd3 Add IQ and Gateway module 2019-01-03 00:19:23 +01:00
Philipp Hörist d93fe8b1ea HTTPAuth: Use nbxmpp handlers 2019-01-02 16:53:06 +01:00
Philipp Hörist d121bbf4ab Refactor Zeroconf presence 2019-01-02 16:10:30 +01:00
Philipp Hörist 0fcf90f8d5 Fix pylint errors 2019-01-02 02:16:42 +01:00
Philipp Hörist f2beea0df3 Refactor Caps module 2019-01-02 02:04:54 +01:00
Philipp Hörist a289ad5f60 Refactor Presence
- Remove option to hide self contacts for now. This makes the code less
complicated.
- Move as much code as possible into the presence module
- Use nbxmpp properties
2019-01-02 02:04:42 +01:00
Philipp Hörist 608607b721 Remove old PEP code 2018-12-31 10:54:51 +01:00
Philipp Hörist d06b73d7c6 Rename some muc events 2018-12-30 21:18:17 +01:00
Philipp Hörist 0ad369dc97 Refactor MUC Presence
- Use nbxmpp properties
- Split into multiple events
- Add new options in the group chat menu for print settings
2018-12-30 20:06:59 +01:00
Philipp Hörist 79684d90d5 Simplify vcard avatar code
- Use nbxmpp properties
2018-12-28 13:38:15 +01:00
Philipp Hörist 34306921ed Correctly parse delay in groupchats 2018-12-28 11:54:54 +01:00
Philipp Hörist 8094cadbea Refactor MUC module
- nbxmpp provides now most of the MUC code
2018-12-27 22:13:35 +01:00
Philipp Hörist c63e32634a Adapt Zeroconf to nbxmpp changes
Fixes #9503
2018-12-23 22:33:10 +01:00
Philipp Hörist 0e6011c088 Ignore bookmark updates from other jids
Because we use +notify to subscribe to the bookmarks node, we get notifications from contacts that have an open access bookmarks node
2018-12-21 19:10:18 +01:00
Philipp Hörist 4503f466d6 Simplify gc-message-received event 2018-12-21 18:36:09 +01:00
Philipp Hörist 85e79e7b27 Use nbxmpp properties for HTTPAuth
nbxmpp implements HTTPAuth now, so we dont need to parse it anymore
2018-12-21 12:23:26 +01:00
Philipp Hörist 42c1909d3b Remove carbon processing
nbxmpp does that now for us
2018-12-20 23:18:23 +01:00
Philipp Hörist c614ac69df Refactor voice approval 2018-12-19 23:24:44 +01:00
Philipp Hörist ce6839957d Catch mediated invites only if type is normal
https://xmpp.org/extensions/xep-0045.html#invite-mediated
2018-12-19 23:00:56 +01:00
Philipp Hörist 5f555193c7 Send active instead of gone as last chatstate
- Also attempt to fix #9446
2018-12-19 23:00:56 +01:00
Philipp Hörist e9f4c5050e Refactor MUC captcha challenge code 2018-12-19 23:00:50 +01:00
Philipp Hörist 1fec6681cd Move MUC config change handling into MUC module
- Remove status conditions code, since the XEP made a namespace bump to :1 and is now backwards compatible its useless
- XEP-0045 mentions status code 100 can be in messages but there is no case given where this would ever happen, so its removed from message handling
2018-12-19 23:00:09 +01:00
Philipp Hörist 7286f4286f Add feature-discovered event
This lets us move more GUI code out of the common module
2018-12-18 22:41:06 +01:00
Philipp Hörist 841f12f75b Fix mypy errors 2018-12-17 00:41:46 +01:00
Philipp Hörist 96edd79963 Handle PEP bookmarks notifications
- Handle PEP bookmark notifications
- On new bookmarks with the auto join flag set, join the MUC
- Dont merge private and pubsub bookmarks
- Only use pubsub if the conversion feature is announced
2018-12-17 00:36:45 +01:00
Philipp Hörist be420d44fc Implement XEP-0411 Bookmarks Conversion
If bookmarks conversion is announced by the server:

- Dont merge bookmarks
- Only push to either private storage or pubsub
2018-12-10 22:30:45 +01:00
Philipp Hörist b8863e82be MUC: Identify subject change correctly
Fixes #9491
2018-12-09 00:29:20 +01:00
Philipp Hörist 4968fe39e2 Correctly remove ping timeout
Fixes #9481
2018-12-05 17:03:34 +01:00
Philipp Hörist 62253c804a Discover the bookmarks conversion server feature 2018-12-04 20:41:44 +01:00
Philipp Hörist 78f439c611 Refactor disconnect code
Fixes #9467
2018-12-04 19:28:50 +01:00
Philipp Hörist 59855a6c8d Determine delay timestamp correctly
- Check the from attr on the delay node to determine if its a user timestamp or from the server
- Dont use user timestamp for sorting
- Record the user timestamp in additional data so its saved to the database

Fixes #9444
2018-12-04 12:18:17 +01:00
Philipp Hörist fd6dec1208 Handle presence without from attr correctly
Fixes #9472
2018-12-03 15:40:43 +01:00
Philipp Hörist 432a4edbc1 Use custom dict for additional data
This makes it easier to retrive and store values
2018-11-30 23:05:15 +01:00
Andrey Gursky f942e2c70f Fix receipts for chat
This is a regression from e3050697
2018-11-27 02:17:25 +01:00
Philipp Hörist c8b5eb94a9 Remove unused imports 2018-11-20 16:16:30 +01:00
Philipp Hörist c61bd65607 Simplify PEP module inits 2018-11-20 15:32:01 +01:00
Philipp Hörist e305069798 Fix receipts for MUC-PMs 2018-11-19 19:33:28 +01:00
Philipp Hörist 1504805575 Dont answer groupchat receipt requests 2018-11-19 17:51:18 +01:00
Philipp Hörist d13baed80f Improve Entity Time parsing
- Use parse_datetime()
- Improve tzo node validation
2018-11-18 10:35:13 +01:00
Philipp Hörist f40f171ecd Refactor parse_datetime and add unit test 2018-11-18 10:35:13 +01:00
Philipp Hörist 7f1dfe5a8c New DataFormWidget: Add Captcha support 2018-11-15 21:02:09 +01:00
Philipp Hörist 62b210a9e5 Pass account to plugins when encrypting a file 2018-11-11 10:40:48 +01:00
Philipp Hörist f5a19c24a9 Cast messages from a bare muc jid to groupchat 2018-11-05 21:08:34 +01:00
Emmanuel Gil Peyrot b4d34bf7f6 Move XEP-0231 into its own module 2018-11-05 19:58:49 +01:00
Philipp Hörist 6b65a23371 DataForms: Make validation possible
- Show orange warning icon if a field is required
- Show red error icon if validation of the field failed
- Set validation error text as tooltip of the icon
- DataFormWidget emits a signal 'is-valid' on every change
2018-11-04 00:58:34 +01:00
Philipp Hörist 61a791d67c Rewrite GroupchatConfig dialog
- Complete rewrite of the dialog
- Use new DataFormWidget
2018-11-02 22:24:28 +01:00
Philipp Hörist 53ec34a955 Use parse_datetime for parsing idle time
Fixes #9393
2018-10-19 20:37:18 +02:00
Philipp Hörist 8487bdb83e Make bookmark parsing more resilient
Fixes #9385
2018-10-19 15:59:04 +02:00
Philipp Hörist ba2618d035 Set password correctly on MUC join 2018-10-14 21:42:51 +02:00
Philipp Hörist c81711fdf0 Reset chatstate correctly if contact goes offline 2018-10-11 00:11:03 +02:00
Philipp Hörist f565928890 Fix a few things regarding chatstates
- Fix wrong chatstates issued because of textview changed signal
- Fix chatstates in PMs
2018-10-09 00:01:35 +02:00
Philipp Hörist bf87ad5ac8 Import _() instead of using builtin namespace
- Prepare for removing the global installed _() method in builtins
- Sort some imports along the way
2018-10-06 22:38:55 +02:00
Philipp Hörist 34553b6ca7 Add a configurable threshold for MAM in MUC 2018-10-04 21:42:06 +02:00
Philipp Hörist 8b7aae564b MUC: Set active chatstate on messages 2018-10-03 09:56:56 +02:00
Philipp Hörist 460d390795 Refactor Chat State Notifications
- Move code into chatstate module
- Refactor most of the code, make it much simpler
2018-09-30 22:58:38 +02:00
Philipp Hörist acf79ffe8a MAM: Up the requested page size 2018-09-30 10:01:42 +02:00
Philipp Hörist a8c0567bd0 Request security catalog from the barejid
- Some Code/UI cleanup
2018-09-30 00:15:00 +02:00
Philipp Hörist 8ff3e55f33 Fix security labels 2018-09-29 18:29:59 +02:00
Yann Leboulanger 5aa41c7f63 handle error message from MUC correctly. Fixes #9280 2018-09-23 22:45:05 +02:00
Philipp Hörist d29f6b2ca9 Dont parse our own nick on sent carbons
Fixes #9051
2018-09-22 15:35:45 +02:00
Philipp Hörist 7bb6f8b22e Fix bare-except pylint errors 2018-09-16 23:45:01 +02:00
Philipp Hörist 7018d5be0e Dont retract pep items on UserXEPs
This leads to multiple problems

1. We cant assume only items with id='current' are stored in the node
which would lead to retracting 'current' but another item would become
the last published and sent to users

2. Even if we have a SingletonNode retracting the only item means the Node
would be empty and offline clients would not receive the last published item
on coming online, because there is no item anymore

Instead we always publish an empty item from now on
2018-09-16 13:35:55 +02:00
Philipp Hörist e85bc52c8b Fix sending empty pep data 2018-09-16 12:58:37 +02:00
Philipp Hörist de0c0a9c08 Fix unsued-import pylint errors 2018-09-16 11:37:38 +02:00
Philipp Hörist d54d4bc232 Add annotations and fix pylint/mypy errors 2018-09-13 23:56:12 +02:00
Philipp Hörist 64aec8adce Add annotations 2018-09-12 21:08:37 +02:00
Philipp Hörist b99632ab03 Fix pylint errors 2018-09-12 00:01:54 +02:00
Philipp Hörist 09c5183575 Fix pylint errors in common/modules 2018-09-11 22:25:55 +02:00
Philipp Hörist 4ad38d5398 Make some vars private 2018-09-11 20:00:34 +02:00
Philipp Hörist a34bf54c46 Fix mypy error regarding _() 2018-09-11 19:29:08 +02:00
Philipp Hörist 2649b3d01e Add annotations to modules/util.py 2018-09-11 00:47:59 +02:00
Philipp Hörist ca9b4cb596 Add annotations for modules/__init__.py 2018-09-11 00:47:54 +02:00
Philipp Hörist bcf2a3770d Remove unnecessary code
NetworkIncomingEvent defines base_network_events and generate() already
2018-09-11 00:37:00 +02:00
Philipp Hörist f82cd95f2c Fix subscribing to contact
Fixes #9321
2018-09-09 17:43:17 +02:00
Philipp Hörist 0a20cb5997 Fix fallback for bookmark name 2018-09-08 23:55:31 +02:00
Philipp Hörist 27f7580688 Light refactring of bookmark code
- Convert xs:boolean values in bookmark module
- Use python booleans for minimize and autojoin in other parts of Gajim
- Use add_bookmark() instead of manipulating the bookmarks dict
2018-09-05 00:06:59 +02:00
Philipp Hörist b62335eaf5 Add a bookmark sorting method 2018-09-04 23:22:57 +02:00
Philipp Hörist be6c2d4f7a Add XEP-0398 optimizations
- If the server implements XEP-0398 we dont need to add the avatar sha
anymore, the server adds it for us.
- It also means we dont have to query our own avatar from vcard at start
because the server tells us the avatar sha that is published with the inital
presence reflection
2018-09-01 20:40:20 +02:00
Philipp Hörist c68f4f1041 Send all presence through the presence module 2018-09-01 18:06:21 +02:00
Philipp Hörist 8a34261137 Parse delay after decryption
Delay could be encrypted with full stanza encryption
2018-08-30 19:19:47 +02:00