Commit graph

334 commits

Author SHA1 Message Date
Daniel Gultsch 064926a18b fixed regression that caused stanza-ids not to be saved 2017-03-08 20:20:34 +01:00
Daniel Gultsch 1c56b74e41 closing the corresponding conversations after blocking a contact. fixes #2347 2017-03-06 16:53:54 +01:00
Daniel Gultsch 5a00b11594 extract stanza-id from muc reflections 2017-03-06 13:30:13 +01:00
Daniel Gultsch 4a7dbaab1e deduplicate every message with a stanza-id from the server 2017-03-06 11:24:04 +01:00
Daniel Gultsch 6088913fb6 fixed multi-session-nick renaming behaviour 2017-03-05 17:42:17 +01:00
Daniel Gultsch c740386297 rename the Xmlns class to Namespace 2017-03-01 13:01:46 +01:00
licaon-kter d3dd80eec9 Fix a typo in legacy 2017-02-19 15:47:57 +02:00
Daniel Gultsch caa16a8517 experimental mam legacy compat layer 2017-02-15 16:42:35 +01:00
Daniel Gultsch 6e62b62b80 respond to xep-0184 requests in muc pms 2017-02-15 12:09:36 +01:00
Daniel Gultsch c7e95d105c fixed behaviour in message parser when doing mam catchup 2017-02-15 00:08:49 +01:00
Daniel Gultsch bb249e0881 only extract stanza-id from live messages when disco feature is set 2017-02-14 23:16:51 +01:00
Daniel Gultsch b90a1fe1db bump mam namespace 2017-02-14 17:19:45 +01:00
Daniel Gultsch 2665c3a1e0 rethink mam catchup strategies 2017-02-14 16:50:33 +01:00
Daniel Gultsch 9b6ae6d75f configurable local message retention period. (untested) 2017-01-23 17:14:30 +01:00
Daniel Gultsch 4c6ef3b24e cleaning up crypto targets when conference member is getting removed 2017-01-22 18:58:49 +01:00
Daniel Gultsch 780d1daf7e fixed some issues around ibb 2017-01-20 22:37:50 +01:00
Daniel Gultsch 39bb8ad05f automatically bookmark private, non-anonymous mucs where inviter is trusted. fixes #2035 #937 2017-01-09 19:54:27 +01:00
Daniel Gultsch d03c431137 use original message to parse pep 2016-12-23 21:16:58 +01:00
Daniel Gultsch 55b60f6b0f don't correct a message if that would create a duplicate 2016-12-09 20:03:48 +01:00
Daniel Gultsch e5d7357e6e mark conversations as read after receiving blocklist push for that conversations 2016-11-28 15:51:11 +01:00
Daniel Gultsch 1d3167b520 extract affiliations from unavailable presence 2016-11-13 19:25:58 +01:00
Daniel Gultsch 07a71d312a extracting stanza-id where by=account 2016-10-31 12:07:08 +01:00
Daniel Gultsch 8557120ef8 add error message to failed messages. accessible via context menu 2016-10-26 12:26:04 +02:00
Daniel Gultsch f3ef8d4978 fetch new conference configuration on every conf update 2016-10-08 12:10:53 +02:00
Daniel Gultsch 1f7f82da7b respond to chat marker request only when mutual presence subscription exists 2016-10-07 10:05:08 +02:00
Daniel Gultsch 0af13fc746 be more careful parsing integers in omemo 2016-10-06 22:05:18 +02:00
Daniel Gultsch 9f060f477f parse smacks delay from messages 2016-10-06 18:09:44 +02:00
Daniel Gultsch c3b11e515e download own vcard avatar if none is set. fixes #2008 2016-09-09 11:04:05 +02:00
Daniel Gultsch caafd03130 don't automatically download files and avatars when datasaver is on 2016-08-27 13:35:52 +02:00
Daniel Gultsch ed2fa20414 handle invalid prekey ids in bundle 2016-08-02 10:40:24 +02:00
Daniel Gultsch 0e96e0a796 show identity type for device selection 2016-07-28 22:58:37 +02:00
Daniel Gultsch cf7df84cab add trillian to html otr parsing fixes #1963 2016-07-27 20:11:02 +02:00
Daniel Gultsch 27690865a6 respond to XEP-0202: Entity Time 2016-07-13 18:10:10 +02:00
Daniel Gultsch f7933c26d7 don't crash on broken base64 in omemo messages. fixes #1934 2016-06-29 17:18:57 +02:00
Daniel Gultsch 8882c6b6fd parse §5.1.2 full jids from muc archives for OMEMO messages 2016-06-28 10:33:46 +02:00
Daniel Gultsch 982a20fef5 refactor code that reads real jid from muc 2016-06-22 12:22:57 +02:00
Daniel Gultsch 4ba5472d0c respond to block list push 2016-06-22 12:22:36 +02:00
Daniel Gultsch b92b3863b9 don't handle chat states in muc or from archive 2016-06-16 20:38:02 +02:00
Daniel Gultsch 1eb776f39c synchronize message body changes for message correction 2016-06-16 11:47:40 +02:00
Daniel Gultsch 60588af825 replace corrected messages in decryption queue 2016-06-15 14:29:25 +02:00
Daniel Gultsch 5f40a7042d delay notification until after pgp decryption 2016-06-15 12:44:29 +02:00
Daniel Gultsch 587fb3cca3 refactored pgp decryption 2016-06-13 13:32:14 +02:00
Daniel Gultsch 31dd7b5a21 parse real jid from muc mam messages. (disabled)
parsing this is dangerous if server doesn't filter properly
thus it is disabled in config
2016-06-12 12:50:53 +02:00
Daniel Gultsch 36ae840d76 log all background stanzas when background logging is enabled 2016-06-05 02:04:31 +02:00
Daniel Gultsch 71e9117176 opt-in to send last userinteraction in presence 2016-06-04 16:16:14 +02:00
Daniel Gultsch 25211f13b3 make grace period configurable 2016-06-02 00:24:37 +02:00
Daniel Gultsch 91732b89ea log background msgs not foreground msgs 2016-06-01 11:37:03 +02:00
Daniel Gultsch 15316e6a7f only log inner stanza but display isCarbon 2016-06-01 09:03:21 +02:00
Daniel Gultsch 44833c1499 don't push default muc conf twice 2016-05-27 10:35:00 +02:00
Daniel Gultsch 841e718d6a make newly created conferences private by default 2016-05-26 12:39:31 +02:00
Daniel Gultsch 79796b0079 don't respond to otr messages in muc pms 2016-05-25 21:05:51 +02:00
Daniel Gultsch 277e3d59c8 update ui after affiliation changes 2016-05-21 09:25:37 +02:00
Daniel Gultsch 9ce2cfa3d2 resetting fetch status error when mutual subscription is reestablished 2016-05-19 10:47:27 +02:00
Daniel Gultsch b478eca315 improved ordering of muc participants 2016-05-17 15:01:56 +02:00
Daniel Gultsch 61726f4994 refactored muc item parsing to also parse muc status messages 2016-05-17 14:25:58 +02:00
Daniel Gultsch fc5304c6fe change affiliation for in memory users that are currently not joined in a conference 2016-05-16 19:58:36 +02:00
Daniel Gultsch 8d0693ed6a keep conference members in memory and show them in conference details 2016-05-16 19:58:36 +02:00
Daniel Gultsch cf5ca27a06 escape HTML in OTR messages if other client is Pidgin 2016-05-15 12:35:31 +02:00
Daniel Gultsch a25912c32c log incoming iq requests 2016-05-15 09:55:06 +02:00
Daniel Gultsch aced9d2697 do not process self presence
we don't want our own resource show up in the self contact
2016-05-13 11:20:27 +02:00
Daniel Gultsch 27b245ac35 do not show last-seen metric in UI 2016-05-10 09:41:30 +02:00
Daniel Gultsch 5021b9a5dd don't request disco from self 2016-04-28 19:02:20 +02:00
Daniel Gultsch 1901abd05f expert setting to manually change presence 2016-04-22 21:25:06 +02:00
Daniel Gultsch e074104004 save otr fingerprint in message 2016-03-31 21:15:49 +02:00
Daniel Gultsch 09d87965fb mark oob messages and always display download button 2016-03-04 20:09:21 +01:00
Daniel Gultsch 9e0466d1e6 refactored omemo to take multiple recipients 2016-02-29 13:18:07 +01:00
Daniel Gultsch d1a456f3e3 made hard coded choice for encryptions more flexible and disable parsing 2016-02-24 14:47:49 +01:00
Daniel Gultsch 34f2a63190 update notification after message correction 2016-02-23 16:15:23 +01:00
Daniel Gultsch a0d0ed34ae turned muc errors into enum. added error codes for service shutdown 2016-02-22 20:19:58 +01:00
Daniel Gultsch 3bde4dbedb change uuid when replacing messages 2016-02-20 00:01:39 +01:00
Daniel Gultsch e6f8b7d9fa decrypt pgp message corrections 2016-02-19 21:02:33 +01:00
Daniel Gultsch 49a3f6f281 never parse show in presences as offline 2016-02-19 11:09:28 +01:00
Daniel Gultsch 59978e157c only offer message correction for the very last message 2016-02-17 16:51:36 +01:00
Daniel Gultsch c2fbdbde83 log reason why otr message won't be parsed 2016-02-16 14:22:47 +01:00
Daniel Gultsch a9b957e8a2 added setting to opt-out of message correction. renamed preferences and options to settings 2016-02-16 09:57:59 +01:00
Daniel Gultsch c0b3a3ff0c basic support for XEP-0308: Last Message Correction. fixes #864 2016-02-15 23:15:04 +01:00
Daniel Gultsch f37098a54f catch all axolotl parse exception at once. fixes #1692 2016-02-11 12:26:43 +01:00
Daniel Gultsch 91ec4839ac prepend instead off append mam messages to conversations when going in reverse 2016-02-04 16:40:18 +01:00
Daniel Gultsch 17791a703e removed unecessary logging when muc tiles update 2016-02-04 10:27:38 +01:00
Daniel Gultsch 0911669b07 count all messages in a query 2016-02-03 16:04:21 +01:00
Daniel Gultsch 1274b0ef39 Revert "get rid of broken totalMessageCount for mam queries"
This reverts commit 58c6f9bfb2.
2016-02-03 10:40:44 +01:00
Daniel Gultsch f0798216d5 refactored disco cache. avoid making duplicate call. check hash 2016-02-03 10:40:02 +01:00
Daniel Gultsch 4a1a59f0c8 Merge branch 'disco-caps' of https://github.com/singpolyma/Conversations into singpolyma-disco-caps 2016-02-02 18:19:26 +01:00
Daniel Gultsch 58c6f9bfb2 get rid of broken totalMessageCount for mam queries 2016-02-02 15:39:46 +01:00
Daniel Gultsch f30df7a535 catch a few NPE when parsing invalid pep nodes 2016-02-02 11:21:07 +01:00
Daniel Gultsch a3e11415ec refactored user handling in conferences. show try again button when conference has errors 2016-02-01 12:11:40 +01:00
Daniel Gultsch 2eef37174e fixed false set of subject in conference with empty body tag 2016-01-31 14:42:35 +01:00
Stephen Paul Weber ae84ff2f0c Do disco for caps hashes we have never seen
Then cache it
2016-01-24 17:46:08 -05:00
Stephen Paul Weber 000f59d614 Fetch cached caps result on new presence 2016-01-24 17:46:08 -05:00
Stephen Paul Weber bf5b2f73f5 Use a Presence class for presence information
Only has status for now, but doing it so I can add disco to it
2016-01-24 17:46:08 -05:00
Daniel Gultsch 73e2389eee use actual message timestamp instead of delay when updating last seen. fixes #1618 2015-12-31 18:06:11 +01:00
Daniel Gultsch e10a0b0c4c let message parser not artifically fail on messages with no to attribute 2015-12-17 14:30:00 +01:00
Daniel Gultsch 88523bbb50 more detailed logging 2015-12-12 15:58:22 +01:00
Daniel Gultsch b2c278c91b set bookmark name to room subject if no subject has been set before 2015-12-11 19:28:44 +01:00
Daniel Gultsch 293e820a58 get rid of lastMessageTransmitted in favor of db query 2015-12-11 13:52:04 +01:00
Daniel Gultsch 55c1129a65 notify on mam catchup messages 2015-12-10 23:05:11 +01:00
Daniel Gultsch 2262921ff4 properly clean up timed out mam queries 2015-12-10 18:28:47 +01:00
Daniel Gultsch 5bd70cfee8 always show conversations with pending subscription requests 2015-12-09 12:18:06 +01:00
Daniel Gultsch 11e58607c9 when no avatar found show avatar of contact and not the muc user in conferences 2015-12-09 10:30:26 +01:00
Daniel Gultsch 6358f641e7 check for query object as condition to trigger deduplication instead of serverId 2015-12-05 18:41:38 +01:00
Daniel Gultsch 41dcd8005b parse stanza-id from messages 2015-12-04 22:03:46 +01:00
Daniel Gultsch cd9a29718b properly clear muc user avatar caches 2015-12-04 21:36:48 +01:00
Daniel Gultsch 242887447c use proposed nick as default nick in mucoptions 2015-12-04 14:07:16 +01:00
Daniel Gultsch 6b592435cd parse vcard avatars from muc presences 2015-12-03 18:18:34 +01:00
Sam Whited a3eb540f05 Show status message when contact requests presence
Remove presence when conversation closed
2015-12-02 08:50:52 -06:00
Daniel Gultsch d42c82abf2 combine multiple message receipts into single message 2015-12-01 12:22:47 +01:00
Daniel Gultsch 6a458b853c Merge pull request #1513 from fiaxh/pgp_background_decryption
PGP messages background decryption
2015-10-30 10:18:27 +01:00
Daniel Gultsch c7ff196f58 push CN into nick pep node when uploading certificate. subscribe to nick node 2015-10-29 13:41:08 +01:00
fiaxh 29a849cb92 Decrypt PGP messages in background 2015-10-28 19:57:11 +00:00
Daniel Gultsch 9b07059b6e update last seen in mucs. fixes #1508 2015-10-19 23:20:33 +02:00
Daniel Gultsch cfeb67d71d introduced code to verify omemo device keys with x509 certificates.
cleaned up TrustKeysActivity to automatically close if there is nothing to do
2015-10-16 23:48:42 +02:00
Daniel Gultsch 0587ba2ad2 work with muc services that change the message id 2015-10-14 11:15:18 +02:00
Daniel Gultsch e6af502055 clear notification and activate grace period when receiving chat marker from another instance 2015-10-06 11:44:27 +02:00
Daniel Gultsch 8f4b7686c9 catch invalid base64 on omemo key decoding 2015-08-30 11:11:54 +02:00
Daniel Gultsch 3e0636367a Revert "improved compatibility with muc components that change the message id"
This reverts commit df86b0fc47.
2015-08-26 11:39:18 +02:00
Daniel Gultsch d0b8bd0f8a catch invalid base64 in axolotl key parsing 2015-08-24 18:18:01 +02:00
Daniel Gultsch 0dfb9bd1a0 introduce special iq type for internal timeouts. always use != result to check for error in callbacks 2015-08-23 17:53:23 +02:00
Daniel Gultsch 496f531e2e modified clearIqCallbacks into 2-step process 2015-08-23 08:01:47 +02:00
Daniel Gultsch 1f34fb742c Merge branch 'development' 2015-08-15 14:26:37 +02:00
Andreas Straub 6059b96456 Provide process function for key transport message 2015-07-31 23:28:09 +02:00
Andreas Straub 909f761ca1 Refactor axolotl message processing workflow
XmppAxolotlMessage is now entirely responsible for handling encryption
and decryption of messages, only leveraging XmppAxolotlSession as a
packing/unpacking primitive for payload keys.

Removed pseudo-dead session generation code step from prepareMessage
function, as sessions have been created by invoking the
TrustKeysActivity for a while now.

Added prepareKeyTransportMessage function, which creates a message with
no payload. The key that is packed into the header keyElements can then
be used for other purposes (e.g. encrypted file transfer).
2015-07-31 21:31:45 +02:00
Andreas Straub 5c421da1e1 Change to new wire protocol version 2015-07-31 21:31:45 +02:00
Daniel Gultsch 658919f239 improved 'next encryption' selection 2015-07-31 00:52:46 +02:00
Andreas Straub e6df4d81d2 Tag carbon messages in parser, adapt session logic
Messages sent from another device of the own account are now explicitly
tagged as carboned message. The session detection logic now uses this
tag to find "session borders".
2015-07-29 16:41:58 +02:00
Daniel Gultsch 6b8e1ecb95 log reason for message failure 2015-07-28 14:44:11 +02:00
Daniel Gultsch 63206e6d4a use type=chat more often to go along with new, simple carbon and mam rules
* change chat states to type=chat and chat markers to type=chat
* use same type as requesting stanza for delivery receipts (which should make them type=chat most of the time)
2015-07-22 14:15:00 +02:00
Daniel Gultsch d38228f482 fixed npe in error message handling 2015-07-21 19:45:41 +02:00
Daniel Gultsch f6281a182d fixed npe in error message handling 2015-07-21 19:44:25 +02:00
Daniel Gultsch af76ad0144 end otr session when receiving failed otr message warnings 2015-07-21 12:00:01 +02:00
Daniel Gultsch f1ee5cccf0 bugfix: changed condition of onOtrSessionEstablished being called
fixed #1263
fixed #1260
fixed #1293
2015-07-21 11:59:30 +02:00
Daniel Gultsch 87bc9d3a31 end otr session when receiving failed otr message warnings 2015-07-21 11:52:49 +02:00
Daniel Gultsch f74ee765a2 bugfix: changed condition of onOtrSessionEstablished being called
fixed #1263
fixed #1260
fixed #1293
2015-07-21 11:46:56 +02:00
Andreas Straub 012f036840 Optimize imports 2015-07-20 14:26:29 +02:00
Andreas Straub d173913eba Overhauled Message tagging
Messages are now tagged with the IdentityKey fingerprint of the
originating session. IdentityKeys have one of three trust states:
undecided (default), trusted, and untrusted/not yet trusted.
2015-07-19 22:17:58 +02:00
Andreas Straub 3458f5bb91 Clean up logging
Add a fixed prefix to axolotl-related log messages, set log levels
sensibly.
2015-07-19 22:17:57 +02:00
Andreas Straub 968410ae33 Fix devicelist update handling
No longer store own device ID (so that we don't encrypt messages for
ourselves), verify that own device ID is present in update list
(otherwise republish), reflect update in UI.
2015-07-19 21:32:27 +02:00
Andreas Straub 6867b5c3ab Return empty set on invalid PEP devicelist 2015-07-19 21:32:27 +02:00
Andreas Straub ec6870307e Properly track message sender
Previously, the sender was assumed to be the conversation counterpart.
This broke carboned own-device messages. We now track the sender
properly, and also set the status (sent by one of the own devices vs
received from the counterpart) accordingly.
2015-07-19 21:32:27 +02:00
Andreas Straub 3815d4efa3 Fetch bundles on-demand, encrypt in background
Bundles are now fetched on demand when a session needs to be
established. This should lessen the chance of changes to the bundles
occuring before they're used, as well as lessen the load of fetching
bundles.

Also, the message encryption is now done in a background thread, as this
can be somewhat costly if many sessions are present. This is probably
not going to be an issue in real use, but it's good practice anyway.
2015-07-19 21:32:26 +02:00
Andreas Straub c1d23b2395 Migrate to new PEP layout
Merge prekeys into bundle node
2015-07-19 21:32:26 +02:00
Andreas Straub 299bbdf27f Reformat code to use tabs
This really sucks to do it like this. Sorry. :(
2015-07-19 21:32:26 +02:00
Andreas Straub 77619b55e4 Added PEP and message protocol layers
Can now fetch/retrieve from PEP, as well as encode/decode messages
2015-07-19 21:32:26 +02:00
Daniel Gultsch 78aff1329f renamed HttpConnection to HttpDownloadConnection 2015-07-10 15:14:13 +02:00
Daniel Gultsch a2525346f4 moved null check for to and from in message parser 2015-07-02 18:02:32 +02:00
Daniel Gultsch c20a088ea8 changed mime type handling 2015-07-01 16:01:18 +02:00
Daniel Gultsch d7de311379 refactored bodyContainsDownloadable to be more flexible 2015-06-30 13:52:53 +02:00
Daniel Gultsch 0d01e51da5 don't parse body from muc status messages 2015-06-28 22:14:40 +02:00
Daniel Gultsch 46595b6d43 fixed parsing of muc status messages in new message parser 2015-06-28 20:11:28 +02:00
Daniel Gultsch 6b794eca2c send_received muc messages will mark a conversation a read 2015-06-04 02:47:24 +02:00
Daniel Gultsch fe1cff016f avoid unnessary muc mam queries when message count is 0 after subject 2015-06-02 13:33:20 +02:00