Commit graph

83 commits

Author SHA1 Message Date
Philipp Hörist
6d2a07df70 Remove support for XEP-0090
This is deprecated almost 10 years
2018-06-24 23:33:42 +02:00
Philipp Hörist
7b957a2876 Refactor ping code into own module 2018-06-24 23:33:42 +02:00
Philipp Hörist
81d9e1bcf2 Refactor software version code into own module 2018-06-24 23:33:42 +02:00
Philipp Hörist
1499010394 Refactor entity time code into own module 2018-06-24 23:33:42 +02:00
Philipp Hörist
631740b66b MUC: Fix voice request
Fixes #9159
2018-06-01 20:58:09 +02:00
Philipp Hörist
4bed8ace95 Refactor Notifications
- Use icon names instead of path
- Move PopupNotificationWindow into notify.py
- Make popup class method instead of module method
- Dont use sessions to get control on notification action Fixes #9140
- Add has_focus() method to ChatControlBase
2018-06-01 17:48:05 +02:00
Philipp Hörist
32b74b459e Remove support for ESessions
Fixes #5294
2018-05-28 18:21:45 +02:00
Philipp Hörist
d0ec9812a6 Fix Zeroconf
- Port pybonjour code from gajim_0.16 branch
- Fix some other small things that broke zeroconf
2018-05-22 23:38:04 +02:00
Philipp Hörist
0ea721fbf1 Fix log message
Presence without vcard hash is not invalid
2018-05-21 18:38:47 +02:00
Philipp Hörist
bcf27cb3c1 Support for PKIX over Secure HTTP (POSH)
Fixes #9083
2018-05-01 21:08:26 +02:00
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