Commit Graph

293 Commits

Author SHA1 Message Date
Daniel Gultsch 84120a341a removed unnecessary configuration fetch after join 2015-11-26 06:53:24 +01:00
Daniel Gultsch a557d38e4d pgp fixes and revert configuration changes 2015-11-25 20:47:02 +01:00
fiaxh fac1d4e0bd Use OpenPGP-API 9.0 2015-11-09 13:49:57 +00:00
Daniel Gultsch 34bcc59f72 fixed session objects not being build on start up 2015-10-30 12:05:21 +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 8553d5a563 moved db calls made from UI into serial background thread 2015-10-29 17:20:01 +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 1bd68a42b2 join muc even if initial conference configuration fetch failed 2015-10-22 11:20:36 +02:00
Daniel Gultsch 53125dbccc move chat state reset from background switch to foreground switch to account for chat states sent in the mean time 2015-10-19 23:22:29 +02:00
Daniel Gultsch be38b1e5f4 disconnet in background thread 2015-10-17 16:10:56 +02:00
Daniel Gultsch a83aae341f improved error reporting in trust keys activity 2015-10-17 14:09:26 +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 fb7359e6a3 block code when doing unforced disconnect 2015-10-16 09:58:31 +02:00
Daniel Gultsch 30dbf97a1c clear bitmap cache before running out of memory 2015-10-14 22:55:59 +02:00
Daniel Gultsch 5f9476448f make unread status and notifications presistent across restarts 2015-10-14 21:18:34 +02:00
Daniel Gultsch 212d1a8c91 add config variable to enable x509 verification 2015-10-12 13:18:20 +02:00
Daniel Gultsch 7be331bbb2 add menu item in account details to renew certificate 2015-10-11 16:10:52 +02:00
Armin Novak 6a6cb43b17 Captcha support. 2015-10-11 13:11:50 +02:00
Daniel Gultsch b23cb5a9e4 initial UI work to allow setting up accounts from certifcates 2015-10-09 13:37:08 +02:00
Daniel Gultsch e65068d226 catch exception when unregistering receivers that have not been registered before 2015-10-08 00:52:04 +02:00
Daniel Gultsch 52a5e72b02 introduced expert options to set status to away and xa if screen is off or if phone is silenced 2015-10-08 00:35:04 +02:00
Daniel Gultsch 8f066d00e0 do mam query after join 2015-10-06 16:58:56 +02:00
saqura fd61d67dab Use MAM for MUC initial history retrieval
If the MUC supports MAM (XEP-0313), use it to retrieve the history
when joining.
2015-10-06 16:23:45 +02:00
saqura 05d0c9f4fe Properly check for MUC MAM support
Only use MAM (XEP-0313) in MUCs if it is supported.

This should fix #1264
2015-10-06 16:23:18 +02:00
Daniel Gultsch 2b9b700c96 don't put conference joins into pending on initial bind 2015-10-01 16:01:19 +02:00
Daniel Gultsch 6a0b9971aa reset muc options immediately befor join 2015-10-01 13:03:15 +02:00
Daniel Gultsch 648e29db2c only invoke MTM in interactive mode after direct user input
fixes #1027
fixes #792
fixes #1439
2015-09-29 19:24:52 +02:00
Daniel Gultsch b9002d7fd5 added missing type='submit' to mam queries
fixed some nasty inheritance problems along the way
fixes #1411
2015-09-15 22:52:39 +02:00
Andreas Straub a95c451f1e Only show that have sessions in fingerprint list
Doesn't access database directly anymore but goes through AxolotlService
now to obtain list of fingerprints associated with an Account/Contact.
This should prevent orphaned keys littering the UI which previously
couldn't be removed through the Clear Devices function.

Together with 1c79982da84964c1d81179a0927d9cd1eadf53de this fixes #1393
2015-09-06 15:15:57 +02:00
Daniel Gultsch fc594e249a added special error state for dns timeout 2015-09-01 22:37:52 +02:00
Daniel Gultsch b0c19d6bac fixed bug that prevented newly opened conversations to load the entire history via mam. fixes #1328 2015-08-30 11:24:37 +02:00
Andreas Straub c4a548ada0 Only announce device after publishing bundle 2015-08-26 15:45:21 +02:00
Daniel Gultsch ea2ce78d6e be more restrictive about marking messages as sent_received in muc parser 2015-08-26 12:11:12 +02:00
Michael ae9de26f59 remove unused imports. 2015-08-25 12:40:22 +02:00
Daniel Gultsch 7bd0f31244 Merge branch 'master' into development 2015-08-23 17:57:53 +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 b0710cdf04 Merge branch 'master' into development 2015-08-23 13:57:14 +02:00
Daniel Gultsch 1688b65965 don't make subsequent iq request when original stanza returned an error 2015-08-23 08:27:05 +02:00
Daniel Gultsch 9e26375d2f simulate old behaviour with messages being set to waiting while offline 2015-08-19 13:00:52 +02:00
Daniel Gultsch c9b2638778 Merge branch 'master' into development 2015-08-19 12:49:24 +02:00
Daniel Gultsch 52f0622dd3 fixed nasty 'stuck at sending' bug that got introduced in 32826ec29d 2015-08-19 12:47:50 +02:00
Daniel Gultsch 83e1e6468e fully depend on sm 2015-08-15 16:57:07 +02:00
Daniel Gultsch 32826ec29d provide extra interface to close sockets. fixes #1330 2015-08-15 14:14:33 +02:00
Daniel Gultsch dad90762b4 do not touch pictures that are already in the right format
fixed #522
2015-08-11 16:50:00 +02:00
Daniel Gultsch 60cd307f73 enable axolotl encryption for jingle supported file transfers 2015-08-01 01:19:16 +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
Daniel Gultsch 658919f239 improved 'next encryption' selection 2015-07-31 00:52:46 +02:00
Daniel Gultsch ff0c114cd6 set time on resend to current time
fixes #1298
fixes #919
2015-07-28 12:54:54 +02:00
Andreas Straub 92b5081b5e Add INACTIVE state for removed keys
We introduce a new trust state: INACTIVE. This state is intended for
old keys that have been removed.

When a TRUSTED device is removed from the PEP devicelist, it's status
will be set to INACTIVE. INACTIVE keys are shown in the UI as greyed
out, non-interactible key rows. Messages are not encrypted for INACTIVE
devices.

When an INACTIVE device reappears in PEP, or a message is received from
an INACTIVE device, it is set back to trusted.
2015-07-21 14:24:59 +02:00
Andreas Straub d2845e9ac1 Refactor axolotl send processing/caching flow 2015-07-20 23:13:28 +02:00
Daniel Gultsch e79f82ca72 attempt to fix the delay problem 2015-07-20 18:11:33 +02:00
Andreas Straub 012f036840 Optimize imports 2015-07-20 14:26:29 +02:00
Andreas Straub e9d7d7e12a Fix set/remove OnUpdateBlocklistListener 2015-07-20 14:12:24 +02:00
Andreas Straub 14010bf5a6 Ask for key trust when sending messages
If the contact (or the own account) has keys that have UNDECIDED trust,
we now drop the user into the new TrustKeysActivity, where they have to
decide for each new key whether it should be TRUSTED or UNTRUSTED.
2015-07-19 22:27:26 +02:00
Andreas Straub 2045a71262 Handle file transmission properly in axolotl 2015-07-19 22:23:28 +02:00
Andreas Straub 43703870e8 Remove unneccessary code 2015-07-19 22:23:28 +02:00
Andreas Straub 4038af2f47 Fix trust status for outgoing messages
Tag sent messages with own fingerprint, set own fingerprint as always
trusted, include own fingerprint in database trust search, explicitly
reset trust colorfilter
2015-07-19 22:23:28 +02:00
Andreas Straub 7f918542c8 Postpone initAccountService until roster loaded
The AxolotlService depends on the roster being loaded when it is
initialized so that it can fill its in-memory SessionMap.
2015-07-19 22:17:57 +02:00
Andreas Straub 69600502d2 Fix asynchronous axolotl message sending
XmppConnectionService.sendMessage() now dispatches messages to the
AxolotlService, where they only are prepared for sending and cached.
AxolotlService now triggers a XmppConnectionService.resendMessage(),
which then handles sending the cached message packet.

This transparently fixes, e.g., handling of messages sent while we are
offline.
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 065519d3f3 Added axolotl activation code to UI 2015-07-19 21:32:26 +02:00
Andreas Straub f73aa1a200 Reworked axolotl protocol layer
Numerous fixes
2015-07-19 21:32:25 +02:00
Daniel Gultsch 5c017e5186 bugfix: use sendIqPacket method in service instead of invoking XmppConnection directly 2015-07-19 14:25:30 +02:00
Daniel Gultsch 58bc4cba06 only try to change affilations for known jids 2015-07-11 21:24:51 +02:00
Daniel Gultsch ce79f4bbe3 renamed downloadable to transferable 2015-07-10 15:11:03 +02:00
Daniel Gultsch 0f5c87ca1f display toast in ui on failed http download
fixes #954
2015-07-10 13:28:50 +02:00
Daniel Gultsch bef731a3c8 refactored sendMessage and merged with resendMessage 2015-07-05 11:59:38 +02:00
Daniel Gultsch 2fbeb0bbb2 make sure unread count is initialized as 0. fixes #1270 2015-07-03 22:08:23 +02:00
Daniel Gultsch c745fbb562 fixed share with activity to account for http file upload 2015-07-02 23:51:59 +02:00
Daniel Gultsch 7e11570f2c show attach button in conferences when http upload is available 2015-06-29 15:21:41 +02:00
Daniel Gultsch 9eb9a52205 initial http upload support
be careful: little error handling and no encryption
2015-06-29 15:21:41 +02:00
Daniel Gultsch 9d1e8205a2 made i/o and memory intensive operations execute in serial order 2015-06-05 08:46:06 +02:00
Daniel Gultsch 53e8964dc1 reworked handeling of system contacts 2015-06-03 14:05:54 +02:00
Daniel Gultsch 0f6f6adca0 removed unnecessary / inacurate debug logging 2015-05-26 13:04:22 +02:00
Daniel Gultsch 6059ed4738 update unread count badge only when necessary 2015-05-26 12:00:38 +02:00
Daniel Gultsch 9debf8037b added default iq handler to print some iq error messages 2015-05-26 11:31:33 +02:00
Daniel Gultsch dc91ff8f29 renamed OtrEngine to OtrService 2015-05-26 04:36:32 +02:00
Daniel Gultsch f579602456 Merge branch 'master' into development 2015-05-25 11:15:14 +02:00
Daniel Gultsch a535d45ec3 log connection age and reshedule ping check 2015-05-25 04:49:36 +02:00
Daniel Gultsch 2364710afb added ShortcutBadger as a dependency to create unread counts on launcher icon 2015-05-20 12:47:04 +02:00
Daniel Gultsch e32f380dae provide helper function for getting the content of a child directly 2015-05-20 03:48:14 +02:00
Daniel Gultsch 4151b72a6e let jingle connection and manager handle message status 2015-05-16 04:12:53 +02:00
Daniel Gultsch 6489ddac6c clear avatar cache when uploading new avatar 2015-05-13 14:33:52 +02:00
Daniel Gultsch d3a6aa9f7a handle conference invites differently to deal with killed activities. fixes #1188 2015-05-12 04:33:04 +02:00
Daniel Gultsch d9e5035c08 config option to reset attempt counts when changing network (default=true) 2015-05-08 06:50:28 +02:00
Daniel Gultsch 05f0aa614f fixed npe when binval value of vcard avatar is null 2015-05-07 11:07:15 +02:00
Daniel Gultsch b7c672e10e avoid fetching avatars multiple times in parallel 2015-05-05 10:29:41 +02:00
Daniel Gultsch 5136bf9832 r/o support for vcard avatars. pep avatars will be prefered 2015-05-05 06:17:34 +02:00
Daniel Gultsch 77caf73103 Merge pull request #1146 from BrianBlade/minor_otr_tweaks
OTR: Fix onContactStatusChanged & dont archive OTR
2015-04-25 14:09:38 +02:00
Daniel Gultsch 5e1492fbff send invite to other instanzes after creating ad hoc conference. fixes #1136 2015-04-23 17:37:47 +02:00
BrianBlade d6443d9b2f OTR: Fix onContactStatusChanged & dont archive OTR
- Fix session handling on contact status change: Do not reset
  potentially active sessions; check peer's OTR-resource on disconnect
- use no-permanent-store hint instead of no-store to ensure
  finished messages are delivered to offline/disconnected clients
- add no-permanent-store to ask compliant servers not to archive
  OTR messages
2015-04-21 22:35:35 +02:00
iNPUTmice defb127d6e Merge branch 'dont_trust_cas_preference' of https://github.com/BrianBlade/Conversations into BrianBlade-dont_trust_cas_preference
Conflicts:
	src/main/res/values-de/strings.xml
	src/main/res/values/strings.xml
2015-04-14 15:17:06 +02:00
BrianBlade 878066ca99 Add option to use MTM without default TrustManager
Add a new "Don't trust system CAs" preference under advanced options
that will change the behaviour of the MemorizingTrustManager. All
formerly unknown certificates will raise a warning if checked.
2015-04-11 15:13:42 +02:00
iNPUTmice 332fe0fd19 don't resume old session when changing resource 2015-04-09 12:46:54 +02:00
BrianBlade dace8ba3d3 Enable end-conversation by swipe gesture
Add EnhancedListView library de.timroes.android:EnhancedListView:0.3.4
to enable swipe-out for ListViews

Re-enable selectableItemBackground

Dont end selectedConversation on swipe

Call mConversationFragment.reinit() instead.
Add separate undo string for swipe MUC.

Add blacklistedConversation for undo swipe

Update title_undo_swipe_* strings

Fix undo(), rename blacklistedConversation

Fix discardUndo(); re-init selectedConversation

maintain scroll position after undo

clear notification when dismissing a conversation

modified / simplified maintain scroll position code

simplify handling of selectedConversation

change undo_muc string, remove notifyDataSetChanged()
2015-04-08 23:29:52 +02:00
BrianBlade 1c600fefcf # add delivery receipts for private muc msgs
# enable update last-seen for muc-msgs
2015-03-18 21:49:41 +01:00
iNPUTmice 87a048fe6f display geo uris as location. show 'send loction' in share menu if request location intent can be resolved 2015-03-07 14:15:38 +01:00
iNPUTmice f25a824610 avoid unnecessary thread creation 2015-03-05 15:46:33 +01:00
Daniel Gultsch ac577fe4fd added methods to count number of unread messages 2015-03-02 11:53:15 +01:00
Daniel Gultsch ff86fa6049 mark all sent messages up to a marker as displayed 2015-03-01 14:15:40 +01:00
iNPUTmice 8319446c03 reset incoming chat state when going into background 2015-02-23 21:47:35 +01:00
iNPUTmice 7ee5e95959 added typing notifications through XEP-0085. fixed #210 2015-02-21 11:06:52 +01:00
iNPUTmice b128b33e56 always go through reconnect method instead of just starting XmppConnection threads 2015-02-18 13:37:26 +01:00
iNPUTmice 67d5ee6b71 moved roster loading to async task as well 2015-02-17 11:51:11 +01:00
iNPUTmice e68c6a1b74 load messages asynchronously 2015-02-12 18:53:00 +01:00
iNPUTmice 44ee746681 added actions to error notification 2015-02-10 17:13:34 +01:00
iNPUTmice 91e85d2faf adapt caps on whether or not message confirmation is on 2015-01-26 00:48:56 +01:00
iNPUTmice f0d428a56d made connect time out more failsave 2015-01-25 20:52:53 +01:00
iNPUTmice b9af38464e fixed mam to work with muc 2015-01-24 00:22:51 +01:00
iNPUTmice 00c74503ab deal with user entering full jids in join conference dialog 2015-01-21 16:18:38 +01:00
Michael fa7d748c3f otr4j: update to 0.22 2015-01-20 18:01:39 +01:00
iNPUTmice 100ba6e7e7 check for deleted files when loading more messages from history 2015-01-19 11:23:05 +01:00
iNPUTmice 7af588c8b3 account for rounding errors when rescheduling wake up 2015-01-19 11:17:27 +01:00
Daniel Gultsch 18eb187949 make room persistant when changing subject or other muc options 2015-01-10 23:10:32 +01:00
Daniel Gultsch d9f88c4669 ensure that everyone is member before making a room private 2015-01-09 13:28:01 +01:00
Daniel Gultsch a9159568b9 allow for very basic muc configuration 2015-01-08 21:29:26 +01:00
Daniel Gultsch 0fe193b027 code cleanup 2015-01-08 14:45:44 +01:00
Daniel Gultsch f8aa1bfec4 kick after ban 2015-01-08 01:23:53 +01:00
Daniel Gultsch 8d655f445a more muc options
* show invite button only with admin privileges or on public conferences
* Offer to ban user in public conferences.
Thanks to @betheg for the awesome ground work for this
2015-01-07 18:34:24 +01:00
Daniel Gultsch ef525fb10e basic affiliation changes in muc 2015-01-07 15:03:29 +01:00
Daniel Gultsch 81e9afdf19 reset next encryption when archiving conversations 2015-01-07 12:20:39 +01:00
Daniel Gultsch a22c8c04d8 use copyonwritearraylist in for phone helper 2015-01-07 01:01:15 +01:00
Daniel Gultsch f02f510c18 fixed bug in new ping strategy 2015-01-06 19:46:52 +01:00
Daniel Gultsch 0c51245ff5 reworked ping scheduling strategy. very experimental 2015-01-05 18:45:39 +01:00
Daniel Gultsch 3522243835 do not run mam queries in findOrCreateConversation() when isn't available 2015-01-04 18:16:55 +01:00
Sam Whited 88704ce5cd Verify IQ responses
Fixes #20

Move fromServer/toServer to AbstractStanza
2015-01-04 08:28:13 -05:00
Sam Whited eb7e683403 Make IqPacket type an enum 2015-01-04 08:20:30 -05:00
Daniel Gultsch e32a927300 Use packet callbacks only for IqPackets. Removed unnecessary code 2015-01-04 12:09:39 +01:00
Daniel Gultsch fc8bd64bfd void messages getting reloaded through mam after clear history 2015-01-03 18:22:26 +01:00
Daniel Gultsch 8bda54d48c code cleanup 2015-01-03 00:47:22 +01:00
Daniel Gultsch bcd3be59ce put Conversations into background mode earlier 2015-01-02 12:04:33 +01:00
Daniel Gultsch 0c22a8d1c6 added callback to change account password to notify UI on success / failure 2014-12-25 22:08:13 +01:00
Sam Whited e4d9dca2fe Add ability to change password on server
Fixes #260
2014-12-25 21:38:55 +01:00
Sam Whited e152ed1e07 Simplify roster handling code
Merge result handling code into IqParser

Fixes #20
2014-12-22 12:53:31 -05:00
Sam Whited af7a64491f Add support for XEP-0191 (Blocking command)
Fixes #791

Squash of commits:
534f25d7dae3ce6852243e28fdd0a69ac01e9463
808fdf5147f27a912a60bee39aa4bf1ddd4f43b4
1eaf8a8330710ad35ba7c368e04f909af623ae4c
31585242c2359efdcd0eeddb9745077f54dbc9eb
2e69bd0bd0286ed1e98a42f4c3421ba4d8cf524b
e904fb5015bf3a1904ab941a1957edf3b1e7abd2
eebbadf3b3816bbf8fcccb763e419fed252d266f
7c5b87724ce494e5a6e8026557ed50a8fd9f23e8
b0eaaf446937794fe19cbdb4f8309c3ff83d4e42
8c652f9e8bb3512958d9ad8c6f1326505f2d98c8
ad0ea1ad948ff6f8fde7b0b10f5163dc8852032f
f5d49897e0dba691ef53a0eddb9ed34d129ad442
a08fa64c505bd895b7c626cfad182380373be20b
de67079113e08394a276048c31f6b21baa300829
9069f342173ba30c2b20c67529c7ff497a6a257d
0169fa79d161ee898c4b6762e207087682a952d8
8585a5bd75a5d56927fed8317729bd15fffe4dcc
0053528a078369e0b65dcf71bda251072a1299c7
e901a9c3554bd7cca193e92919b463991eadfea7
c5c78257434813c69ab9b7558bcc8f7cbe858433
e905af348d46d77bc46b5f7211527684acc02fab
13a0f9a10c7892b0f90f5fabd2f2615701b0fd66
2cfba1e24b0139839e4453b92be7e20634d150cf
58e074fb5bb44b05a8104250fccd7c024c808c1a
0d6cf98fc8eab212d798ac79b336f9b70a14f06d
e23620f56b85bcab9f3b5d9ce1c01524cd9674dc
d72cd2fcc8d54176c3ff53411a69b9bb4642eff3
195143dff8836623a37094a6b8fa6aa01ef31580
5f5f3caf3a1e480a99d27ee5c34ba516419c52e4
1dee3d5861c9f9c710da4cbda3688d94c622ca93
23949b8aa32c78b27bab49bb3c4f3ff588925ce1
9bf97f8ae522796e0dacb7f6fe7a7f90f86a93a1
2014-12-22 08:19:00 -05:00
iNPUTmice 1517641713 get rid of special self presence object and incorporate that into roster 2014-12-20 17:23:03 +01:00
iNPUTmice 6b047bed97 fixed another break continue bug 2014-12-20 12:52:45 +01:00
iNPUTmice 88f43643bf inject ui callback into running mam query 2014-12-20 12:52:08 +01:00
iNPUTmice 741a0c129d made scroling smoother + bug fixes for history loading 2014-12-17 10:50:51 +01:00
iNPUTmice 80435eca5c smoothed out scrolling a bit 2014-12-17 09:32:51 +01:00
iNPUTmice e2f50ab855 go through mam history page by page. load mam dynamically on scroll 2014-12-15 23:06:29 +01:00
iNPUTmice 2bd4621245 fixed history deletion. fixed #780 2014-12-15 17:14:27 +01:00
iNPUTmice f8a496a5f1 run mam queries only when online 2014-12-14 23:23:56 +01:00
iNPUTmice de06cb38d1 refactored the way certain messages are being found within a conversation 2014-12-14 18:10:46 +01:00
iNPUTmice fc293aaede avoiding concurrent modification 2014-12-13 22:17:27 +01:00
iNPUTmice 899802646c reverse through mam history when loading larger chuncks 2014-12-13 15:32:11 +01:00
iNPUTmice 02a89f4ce2 Merge branch 'feature/mam' into development
Conflicts:
	src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
2014-12-13 13:55:24 +01:00