Commit Graph

1015 Commits

Author SHA1 Message Date
André Apitzsch 125ce523e4 Rename src directory 2017-07-02 17:25:47 +02:00
Philipp Hörist 55889d045f Add new extension point method 2017-06-27 20:51:55 +02:00
Yann Leboulanger 388acfca5a fix logging single messages. Fixes #8640 2017-06-14 15:29:19 +02:00
Philipp Hörist 92b0a15521 Pass use_agent to GPG init instead of overwrite 2017-06-08 19:09:22 +02:00
Philipp Hörist b5e9b07a07 Remove unused or old config values 2017-06-06 22:12:37 +02:00
Philipp Hörist ef8229615a Dont save sent MessageStanza for LMC use
There are mutliple reasons why this is not a good idea

1. It places work on encryption Plugins, as many encryption attributes inside the
stanza can not be resend again (OMEMO, OTR), so the plugins have to make sure none of
these attr are inside the LMC stanza

2. In general its not obvious for plugin devs that a stanza issued after LMC has to be
treated differently. There should be no negative effects, even when a contributor not knowing
about LMC at all.

This commit saves only the stanza id, and adds the replace tag on the new message.
This results also in less code.
2017-06-02 03:32:46 +02:00
Philipp Hörist 3335482345 Add 'encryption' config options group
We have to save the value per account and contact, because otherwise
it could lead to problems if a jid is added to more than one account.

As key this uses a string in the form of 'Account-BareJid'.

The config option group 'contacts' is not used because there are values
like 'speller_language' that make more sense to set on a Jid basis, rather than a
Account-Jid basis.

Treat an empty config value or no config value as 'disabled', instead
of writing a config value of 'disabled'. This has the benefit that we
dont have to write config values for contacts were we dont use encryption.
2017-05-18 21:42:40 +02:00
Philipp Hörist 2e148a6133 Add encryption API to groupchat_control 2017-05-07 18:40:09 +02:00
Philipp Hörist cf07022cbd Remove ESessions encryption/decryption from core 2017-05-07 18:40:05 +02:00
Philipp Hörist 3fd35a041e Remove PGP encryption/decryption from core 2017-05-07 18:38:33 +02:00
Philipp Hörist 5116af037b Add Encryption Plugin API
- Add extension points when receiving/sending a message
- Add extension point for setting the lock image
- Add extension point after clicking the send button
- Add extension point when typing
- Add a new menu button to choose the desired encryption
- Extend the PluginManager to hold a list of encryption plugins
2017-05-07 18:38:06 +02:00
Marc Schink 61c2259a9a Use account hostname for STUN server discovery
Use the account hostname instead of the target hostname of the
_xmpp-client._tcp SRV resource record for STUN server discovery.
Otherwise, discovery fails if both hostnames are different.
2017-05-03 10:01:49 +02:00
Philipp Hörist 79dc0c49f1 Always send message delivery receipts requests
- We want to send requests also to offline contacts.
- The XEP is wide spread chances are high that a contact supports it.
- It gets really complicated, when we want to guess if a offline contact supports receipts
2017-05-01 19:23:31 +02:00
Philipp Hörist 33a584b8b0 Dont use message receipts in message to ourself 2017-05-01 19:08:11 +02:00
Philipp Hörist c49d13bcae Use BareJID when sending message to ourself 2017-05-01 17:58:55 +02:00
Philipp Hörist fe3a5a4aee Make some methods public 2017-04-25 14:44:38 +02:00
Philipp Hörist 14091642c4 Merge branch 'change_password_fix' into 'master'
Disable button if password changing is not supported

See merge request !85
2017-04-19 18:54:20 +02:00
Marc Schink 4d8379f492 Disable button if password changing is not supported 2017-04-19 18:17:22 +02:00
Philipp Hörist 09512065d4 Fix wrong inclusion check 2017-04-18 18:26:06 +02:00
Philipp Hörist 6b75f4ab35 Choose MAM namespace and save it 2017-04-18 17:50:15 +02:00
Emmanuel Gil Peyrot f6739730af Implement chatstate in MUC, as defined in XEP-0085 §5.5. 2017-04-14 16:58:04 +01:00
Philipp Hörist a51ea32dc6 Refactor exception handling for logger
- Handle exceptions inside write() instead of propagating the
    exception
- Add error message to exception
- Add dispatch() method in logger
2017-04-12 22:30:55 +02:00
Philipp Hörist 54eb1cbbb8 Simplify log_message()
- Pass EventObj instead of variables
- decrease indent level
- check all conditions inside log_message() not before calling
- fixed bug where gc private messages where not logged with the correct jid
2017-04-12 22:30:28 +02:00
Philipp Hörist bbb5c0f50d Simplify sending message
- Dont use callbacks, they have no gain in that situation and make the code hard to read
- pass the whole object to a new Event instead of many vars
2017-04-06 23:21:19 +02:00
Philipp Hörist 298ba4d939 Fix Last Message Correction for PGP messages 2017-04-04 23:21:11 +02:00
Philipp Hörist caba5e1723 Rename _on_continue_message()
_build_message_stanza is a better fitting name
2017-04-04 21:55:16 +02:00
Philipp Hörist 28a3a58ea9 Refactor encrypting PGP Message
- Add a _encrypt_message() and _finished_encrypt() method
- Handle Fallback body text in _on_continue_message() where we build the Stanza
2017-04-04 21:31:00 +02:00
Philipp Hörist d344c24a2a Pass EventObject around instead of many vars
This makes it much easier to read and modify
2017-04-04 21:30:48 +02:00
Philipp Hörist 1e33af7053 Fix KeyError when privacy list is received 2017-03-14 22:32:28 +01:00
Philipp Hörist a0a036f3eb Decline active list when going visible
Declining the active list will switch us to the default list
2017-03-14 22:32:05 +01:00
Philipp Hörist 2c23b36ac3 Remove redundant method 2017-03-14 22:31:43 +01:00
Philipp Hörist 9f5c13b5bb Dont set default list active on block
There could be another list active (eg. invisible)
If we block someone while invisible, setting the default list
active would make us visible again
2017-03-14 22:31:23 +01:00
Philipp Hörist 25b933e294 Dont try to set empty privacy default list
This will result in a conflict stanza because an active
default list cant be deleted

Decline the use of default list first, then delete the list
2017-03-14 22:31:07 +01:00
Philipp Hörist 63335357be Use push event to query privacy list after edit 2017-03-14 22:30:52 +01:00
Philipp Hörist 18e29ebc55 Add blocked contacts always to the default list 2017-03-14 22:30:16 +01:00
Philipp Hörist 5377fc82f7 Dont block contacts only partially
This is needed for better interop with XEP-0191.
The Server doesnt deliver a partial blocked contact as blocked
to a XEP-0191 Client.
2017-03-14 22:29:50 +01:00
Philipp Hörist 6f8452667d Port application menu to GMenu 2017-02-12 18:17:27 +01:00
Emmanuel Gil Peyrot 57fb80f1fa Remove every default argument using [] or {}. 2017-02-11 02:40:07 +00:00
Emmanuel Gil Peyrot a7349dc603 common.connection: Fix indentation. 2017-02-11 02:40:07 +00:00
Yann Leboulanger d338572271 Update strings for better english. Thanks to Allan Nordhøy for the suggestions 2017-02-04 23:29:45 +01:00
Yann Leboulanger 65362358a9 ability to have a random string in the resource 2017-01-04 13:14:21 +01:00
Yann Leboulanger 458d1083bc do not list all keys when we want to know if we have a key. Fixes #8477 2016-12-17 14:06:36 +01:00
Yann Leboulanger 7b3d595665 fix time.time() call. Fixes #8446 2016-11-28 22:23:42 +01:00
lovetox 7cb31512c6 Add no-store hint to ChatStates 2016-10-18 16:26:03 +02:00
lovetox 4c482cbfe8 Store optional fields correctly in Bookmarks 2016-10-10 19:10:18 +02:00
lovetox a8586ec20a Fix missing time reference - Fixes #8399 2016-10-03 16:34:16 +02:00
Yann Leboulanger 57b2f234c1 Limit time to reconnect to 5 minutes. Fixes #8393 2016-09-18 15:15:10 +02:00
tmolitor 556afac134 Added ability to use additional_data for directly sent messages not coming from history db. 2016-09-05 23:07:31 +02:00
tmolitor 235cadd5cc Corrected last commit and added ability to set and log additional_data for outgoing messages as well (and for gc messages, too) 2016-09-05 01:43:39 +02:00
Philipp Hörist e645f4e838 add new event for gc after message stanza is built so it can be modified by plugins 2016-06-24 20:12:37 +02:00