Commit Graph

73 Commits

Author SHA1 Message Date
Philipp Hörist c534d3a147 Refactor SSL errors
Dont save fingerprints to config and check certs with our own methods.
We should trust openssl to do all necessary checks.

Self signed certs can be added to cacert.pem and will not show up as
an error until the cert changes.

nbxmpp now saves all ssl errors and passes them, so now we loop over
all errors until all are confirmed or ignored by the user

Also cacerts are now saved in utf-8
2018-05-01 14:03:20 +02:00
Philipp Hörist 105427b8fd Use consistent way to get paths
This lets us now import the app module without setting paths
2018-04-25 20:49:37 +02:00
Philipp Hörist 986898f69d Dont check for OpenSSL we require it on install 2018-04-23 23:47:17 +02:00
Philipp Hörist 4c1bfda48d Fix const imports 2018-04-23 18:32:01 +02:00
Philipp Hörist 290e761f88 Add support for Room Avatars
- Groupchats promote a vcard hash with presence

Refactoring:

- Dont delete groupchat contacts if they are maximized from the roster
- Roster and GroupchatControl use the same contact object
2018-04-19 22:11:41 +02:00
Philipp Hörist 70a7000d44 Dont be lenient with namespace 2018-04-19 17:59:17 +02:00
Philipp Hörist 99b3aebc99 Remove unused imports 2018-03-26 01:06:56 +02:00
Philipp Hörist a218864d91 Add stanza to log output in case of an error 2018-03-21 19:53:07 +01:00
Philipp Hörist 51a4c4b5fd MAM: Display corrected messages on MAM catchup
This shows corrected messages correctly in groupchat when we
receive the messages via MAM
2018-02-25 21:20:38 +01:00
Philipp Hörist c6e7f8628d MAM: Display received mam message in open chats 2018-02-25 21:04:34 +01:00
Philipp Hörist 994244c910 MAM: Check muc#user namespace before we disco
1. Check if the message has the muc#user namespace
2. Check if we have this jid already in the DB
3. Last resort disco the jid
2018-02-22 22:03:55 +01:00
Philipp Hörist f30564c15c Dont notify about PMs from MUCs we are not joined
The server sends us carbons if one of our other resources has
a conversation in a muc we are not joined.
Instead we log the messages silently.
2018-02-22 21:42:49 +01:00
Philipp Hörist 70e0bcc5db Pass jid as string to find_stanza_id() 2018-02-21 23:01:47 +01:00
Philipp Hörist 015d99ea63 Print correct archive jid in log message 2018-02-21 22:21:35 +01:00
Philipp Hörist 0c7f1937cf Fix duplicates for self messages and MUC PMs
Fixes #8812
2018-02-21 22:09:13 +01:00
Philipp Hörist fb4b262477 Dont use getTimestamp()
getTimestamp() generates always a timestring with a resolution of seconds and
this means time gets always rounded down.
Because we use a resolution of .00000 precision for outgoing messages this
can lead to wrongly sorted messages.
2018-02-12 21:27:55 +01:00
Philipp Hörist 7479bd8bd6 Refactor getting avatars from pubsub
- use SendAndCallForResponse instead of triggering an Event
- validate iq result even more, it didnt print iq errors before
2018-02-08 21:06:23 +01:00
Philipp Hörist 4bbc6b1972 Fail gracefully on invalid MAM GC Stanza
Fixes #8883
2018-02-07 19:20:19 +01:00
Philipp Hörist 7dacd51c1d Add complex caps test 2018-01-26 23:57:32 +01:00
Philipp Hörist 4c545be737 Inlcude account for message deduplication
It was not possible to write with 2 different accounts into the
same MUC
2018-01-25 00:47:00 +01:00
Bronko 3a3be94aa8 integrate httpupload plugin into gajim core
add new config option 'filetransfer_preference'
add drag and drop support for file upload
2018-01-22 17:29:27 +01:00
Philipp Hörist 1b11d77034 MAM: Dont convert own_jid to string
We need it later as JID object
2017-12-17 17:56:11 +01:00
Philipp Hörist 7815ce19a5 Dont use callbacks when sending messages
Using a callback to display a sent message inside the ChatControl means
that all messages we send have to be issued from the GUI layer
(send_message()) if we want them to display in the ChatControl.

This replaces the callback and catches the stanza-message-outgoing event
after it was processed by the core.

This is easier to read/understand than dealing with callbacks and lets
the core issue messages without having to care if a ChatControl is open or not
2017-12-10 18:56:29 +01:00
Philipp Hörist 786ef96400 Port InformationEvent handling to new interface 2017-12-09 00:15:26 +01:00
Philipp Hörist 7ec57e4dab Lower debug level for malformed avatar stanzas 2017-11-22 14:53:32 +01:00
Philipp Hörist 7f1776ede9 Improve deduplication
A stanza-id is only unique within a specific archive
This adds the archive jid to the query
2017-11-19 19:36:26 +01:00
Philipp Hörist cac1185a23 Remove log message 2017-11-19 19:36:26 +01:00
Philipp Hörist f57ec2fa34 Move common code out of HistoryWindow
- move it into message_archiving.py
2017-11-19 19:36:26 +01:00
Philipp Hörist 95357361bf Save account_id in logs table 2017-11-19 19:36:25 +01:00
Philipp Hörist 536a504f69 Remove Support for mam:0 2017-11-19 19:36:25 +01:00
Philipp Hörist 75b1d54b4c Add MAM for MUCs 2017-11-19 19:36:20 +01:00
Philipp Hörist 5236693df9 Parse stanza-id in groupchat correctly 2017-11-11 21:46:00 +01:00
Philipp Hörist 7f1a839e77 Deduplicate GC and MAM Messages based on stanza-id
- Add methods to determine the unique/stable id
- Write the id to the stanza_id DB field
- Add method to deduplicate based on the unique/stable id
2017-11-07 20:39:36 +01:00
Philipp Hörist 46926e71d1 Remove old message duplicate code
- Calculating so many hashes for each Message is quite expensive
- It hides our own implementation bugs, like when we retrieve history
from a MUC with wrong timestamps, or on rejoin. We never know about it
because the Messages are dropped.
- It should not be necessary anymore. The original problem was a bug
in nbxmpp which triggered mass resending of old messages.
2017-11-07 20:39:36 +01:00
Philipp Hörist 3c823d307d Save oob data also on MAM Messages
- add get_oob_data() so we can use it on more than one event
- also remove a forgotten print call
2017-11-04 13:51:12 +01:00
Philipp Hörist 20d5ea90e7 Store oob data into DB
Right now oob data is merged into the message text and stored into the DB.
If we load this message from the DB we cannot know anymore if and which
parts of the text was oob data.

Use the additional_data api to store oob data into the DB instead of
altering the original message text.

This lets us decide later on if and which data we want to display, even
on history replays. Also plugins can use the data.
2017-11-03 20:36:53 +01:00
Philipp Hörist 4c45c186c4 Pass additional_data to groupchats 2017-11-03 16:33:34 +01:00
Thilo Molitor 0638cdc690 Fix additional_data in events 2017-11-01 23:14:47 +01:00
Philipp Hörist 1c7369229e MUC: Save last message time after each message 2017-10-22 20:12:25 +02:00
Philipp Hörist 3a6e1ac9fc Catch exception for invalid avatars 2017-10-17 20:36:27 +02:00
Philipp Hörist 2446c7e3ed Refactor Blocking List
Fixes #8762
2017-10-15 18:03:41 +02:00
Philipp Hörist 1d5665632a Print malformed pubsub avatar stanzas 2017-10-08 14:32:59 +02:00
Philipp Hörist a01cdbf271 Refactor Avatars
- Add support for Pubsub Avatars
- Dont poll for vCard Updates, only use XEP-0153
- Dont cache vCards
- Store the avatar SHA of roster contacts in the DB
- Store the current SHA of each contact in the Contacts Object
- Move some code into the ConnectionVcard Class
2017-10-08 11:26:28 +02:00
Philipp Hörist 69248b2fe7 Fix pylint/pep8 errors 2017-09-29 00:11:29 +02:00
Yann Leboulanger a378152a9c Remove Gmail special options 2017-09-19 15:44:58 +02:00
Philipp Hörist 8bc2ab096e Add more log output in case we drop carbons 2017-09-03 22:35:56 +02:00
André Apitzsch 89c7eb6e6a Rename gajim.common.gajim to avoid name conflicts 2017-08-18 20:03:20 +02:00
André Apitzsch efec098aef Use absolute imports 2017-08-18 19:48:48 +02:00
Yann Leboulanger 21e144d89d use correct SID in Jingle FT to compute hostname of SOCKS5 connection. Fixes #8703 2017-08-16 15:27:35 +02:00
Philipp Hörist 8c920b35ff Move logging GC messages into connection_handlers
- It should be where all other message received handlers are
- Port to new DB API
2017-08-08 15:24:41 +02:00