Commit graph

627 commits

Author SHA1 Message Date
Daniel Gultsch e38a9cd729 omemo changes: use 12 byte IV, no longer accept auth tag appended to payload 2020-01-18 12:08:03 +01:00
Daniel Gultsch 6025e5de28 make registration uris work with fixed usernames 2020-01-09 20:10:19 +01:00
Daniel Gultsch d039c4870f support registration via pars tokens 2020-01-09 17:42:02 +01:00
Daniel Gultsch ed4a73e1c7 persist file size across aborts
fixes #3601
2019-12-26 19:01:01 +01:00
Daniel Gultsch a60e29d4f4 removed c style array 2019-12-26 17:36:16 +01:00
Daniel Gultsch cc79d8f6b3 properly restore LMC edits. switch to LMC v1.1
fixes #3566

closes #3592
2019-12-04 19:20:24 +01:00
Daniel Gultsch b3c00d7163 use Base64.NO_WRAP instead of trim() 2019-12-04 17:35:06 +01:00
Daniel Gultsch 83520ad8e7 show jabber accounts from local address in Quicksy flavor 2019-12-02 13:50:58 +01:00
Daniel Gultsch 97745bdfbe prevent crash when counterpart in message was null 2019-11-10 11:30:31 +01:00
Daniel Gultsch 07786d4576 optionally search local muc rooms instead of jabber.network 2019-11-02 09:43:37 +01:00
Daniel Gultsch 2bed0dad12 attempt to fix some rare crashes 2019-10-26 13:23:27 +02:00
Daniel Gultsch b96ef1e591 update ui after bookmark change 2019-10-07 09:37:12 +02:00
Daniel Gultsch f530e395ca bookmarks2. introduce #compat namespace 2019-10-07 09:37:12 +02:00
Daniel Gultsch 95bf66ca7d Bookmarks2: support retraction 2019-10-07 09:37:12 +02:00
Daniel Gultsch 6923b2898c WIP Bookmarks 2 support 2019-10-07 09:37:12 +02:00
ChaosKid42 af898b3bc4 LMC: find replacedMessages based on bare JID (#3548) 2019-10-05 20:18:42 +00:00
Daniel Gultsch d6835101b9 fixes for previous commit 2019-10-05 21:58:21 +02:00
Daniel Gultsch be4953b1e4 parse LMC 1.1 2019-09-13 16:38:15 +02:00
Daniel Gultsch 9bf5fb98ac show language in message bubble if multiple language variants were received
XML and by inheritence XMPP has the feature of transmitting multiple language
variants for the same content. This can be really useful if, for example, you
are talking to an automated system. A chat bot could greet you in your own
language.

On the wire this will usually look like this:

```xml
<message to="you">
  <body>Good morning</body>
  <body xml:lang="de">Guten Morgen</body>
</message>
```

However receiving such a message in a group chat can be very confusing and
potentially dangerous if the sender puts conflicting information in there and
different people get shown different strings.

Disabeling support for localization entirely isn’t an ideal solution as on
principle it is still a good feature; and other clients might still show a
localization even if Conversations would always show the default language.

So instead Conversations now shows the displayed language in a corner of the
message bubble if more than one translation has been received.

If multiple languages are received Conversations will attempt to find one in
the language the operating system is set to. If no such translation can be
found it will attempt to display the English string.

If English can not be found either (for example a message that only has ru and
fr on a phone that is set to de) it will display what ever language came first.

Furthermore Conversations will discard (not show at all) messages with with
multiple bodies of the same language. (This is considered an invalid message)

The lanuage tag will not be shown if Conversations received a single body in
a language not understood by the user. (For example operating system set to
'de' and message received with one body in 'ru' will just display that body as
usual.)

As a guide line to the user: If you are reading a message where it is important
that this message is not interpreted differently by different people (like a
vote (+1 / -1) in a chat room) make sure it has *no* language tag.
2019-09-12 10:12:51 +02:00
Daniel Gultsch f11adf4c02 do not put default nick into bookmark if none has been set before 2019-08-19 13:55:52 +02:00
Daniel Gultsch ed95dd64ad create empty disco result on error to fire advance stream features event 2019-08-13 21:18:32 +02:00
Daniel Gultsch c1589d76b5 resetToWaiting should include http uploaded files 2019-07-20 12:15:06 +02:00
Daniel Gultsch 7e93c1021b handle blocking and unblocking of full jids 2019-07-10 17:58:48 +02:00
Daniel Gultsch 7ec8f7952f migrate copy ond write list to synchronized hashset for pending mucs 2019-06-30 21:57:37 +02:00
Daniel Gultsch 0ecdb43be6 rate limit muc pings / joins. never run two pings at same time 2019-06-30 19:54:07 +02:00
Daniel Gultsch 7809af9b57 implement FCM push for group chats 2019-06-25 18:15:51 +02:00
Daniel Gultsch e467fe341e implement client support for muc push
Staying connected to a MUC room hosted on a remote server can be challenging.

If a server reboots it will usually send a shut down notification to all
participants. However even if a client knows that a server was shut down it
doesn’t know when it comes up again. In some corner cases that shut down
notification might not even be delivered successfully leaving the client in a
state where it thinks it is connected but it really isn’t.

The possible work around implemented in this commit is to register the clients
full JID (user@domain.tld/Conversations.r4nd) as an App Server according to
XEP-0357 with the room. (Conversations checks for the push:0 namespace on the
room.)

After cycling through a reboot the first message send to a room will trigger
pubsub notifications to each registered full JID. This event will be used to
trigger a XEP-0410 ping and if necessary a subsequent rejoin of the MUC.

If the resource has become unavailable during down time of the MUC server the
user’s server will respond with an IQ error which in turn leads to the MUC
server disabling that push target.

Leaving a MUC will send a `disable` command. If sending that disable command
failed for some reason (network outage) and the client receives a pubsub
notification for a room it is no longer joined in it will respond with an
item-not-found IQ error which also disables subsequent pushes from the server.

Note: We 0410-ping before a join to avoid unnecessary full joins which can be
quite costly. Further client side optimazations will also surpress pings when
a ping is already in flight to further save traffic.
2019-06-24 18:16:06 +02:00
Daniel Gultsch 17c8bf3452 attempt to keep messages waiting until muc is connected 2019-06-18 18:09:44 +02:00
Daniel Gultsch e5378df39c synchronize around attributes in toContentValues() 2019-05-22 23:58:08 +02:00
Daniel Gultsch 73d66fd703 go forward through cursor in message restore
We have seen some weird CursorIndexNotFoundException that we were unable to reproduce.
We assume that going forward (moveToNext()) through the cursor instead of (moveToPrevious() fixes that issue
2019-04-30 10:45:28 +02:00
Daniel Gultsch b2ea91909b introduced type private_file_message to handle attachments in PMs. fixes #3372 2019-04-27 11:46:43 +02:00
Daniel Gultsch d2c9ce7bf0 store correcting message in db 2019-04-26 11:18:16 +02:00
Daniel Gultsch 8a1a9f4f55 put PM hint above edittext. fixes #3432 2019-04-26 10:23:26 +02:00
Daniel Gultsch 2fa687b8ae refactor muc search to use http 2019-04-22 13:00:45 +02:00
Daniel Gultsch a0f88aa9b4 implement channel discovery over jabber.search.network 2019-04-22 10:42:21 +02:00
Daniel Gultsch ad64058d25 hide lock icon in channels; modify muc user context 2019-02-07 13:18:42 +01:00
Daniel Gultsch 32ef3755e2 show different room settings for channels and groups 2019-02-06 18:29:07 +01:00
Daniel Gultsch b9c4309a28 refactored group chat members into seperate screen 2019-01-25 17:58:23 +01:00
Daniel Gultsch 7f170276a9 refactored avatar workers into single class 2019-01-25 10:07:02 +01:00
Daniel Gultsch 8fbe445c99 scan all files in case some files were previously marked as deleted by accident 2019-01-24 15:03:58 +01:00
Daniel Gultsch a0be2dc54f updated readme 2019-01-21 11:55:52 +01:00
Daniel Gultsch dcdf340a41 normalize nicks before getting them from bookmarks or pep 2019-01-19 11:42:57 +01:00
Daniel Gultsch a53774bc6d resend presence to muc avatar update. fixes #3175 2019-01-17 17:55:47 +01:00
Daniel Gultsch e9bf2b464c explicitly set type=images for all media with an image mime type
this is in preperation to be able to query the database for all images
2019-01-12 09:01:35 +01:00
Daniel Gultsch 7cabb2c377 check if encrypted pgp file get deleted 2019-01-10 21:24:24 +01:00
Daniel Gultsch 52afcac230 mark deleted files in database and not query them when querying for media 2019-01-10 14:52:27 +01:00
Daniel Gultsch b9952f27fd archive destoryed mucs when registering that bookmark has been removed 2019-01-03 14:07:03 +01:00
Daniel Gultsch 1a1bfb3246 show warning snackbar before joining anon-non-private room. fixes #3306 2018-12-09 18:25:11 +01:00
Daniel Gultsch c02676ea4c implement self healing omemo
after receiving a SignalMessage that can’t be decrypted because of broken sessions
Conversations will attempt to grab a new pre key bundle and send a new PreKeySignalMessage
wrapped in a key transport message.
2018-12-02 14:41:29 +01:00
Daniel Gultsch f1e1c4a78d keep track of previously edited ids 2018-12-01 15:52:44 +01:00
Daniel Gultsch 846bba96f2 remove role=none participant when first online participant joins
in anticipations for muc services using registered nicks (and putting nicks
into the member list even if that user is offline) we need to remove that 'fake' user
from the online list when the real user comes online.
2018-11-30 16:28:43 +01:00
Daniel Gultsch ce5dffdbfb transmit display name (nick) in subscription requests and display them on Quicksy 2018-11-26 12:56:30 +01:00
Daniel Gultsch 2c73b62f67 make password editable on auth error 2018-11-21 16:45:38 +01:00
Daniel Gultsch 5c74918a3a only show not stranger if messages are coming from quicksy domain not quicksy contacts 2018-11-21 11:34:19 +01:00
Daniel Gultsch 09f9baeeef do not add self as crytpo target in MUC 2018-11-12 20:14:06 +01:00
Daniel Gultsch 306e12b24e fixed race condition that prevented bookmark nick to be used 2018-11-10 17:33:24 +01:00
Daniel Gultsch 5012ff3545 added interface to edit nick 2018-11-09 17:47:36 +01:00
Daniel Gultsch f0d5dc583d use inContactList() instead inRoster() in the proper places 2018-11-03 16:32:08 +01:00
Daniel Gultsch 4688d68ea1 quicksy server is not a stranger 2018-11-03 16:12:57 +01:00
Daniel Gultsch 2c31fbae78 show synced contacts in choose contact activity 2018-10-31 13:33:55 +01:00
Daniel Gultsch 1bcbd257c3 refresh contacts when opening StartConversationsActivity 2018-10-31 13:33:55 +01:00
Daniel Gultsch 3e1d01798c refresh synced contacts even if offline 2018-10-31 13:33:55 +01:00
Daniel Gultsch 2dee53587b basic phone number sync 2018-10-31 13:33:55 +01:00
Daniel Gultsch a49a5790c7 refactored phone contact loading in preperation for sync 2018-10-31 13:33:55 +01:00
Daniel Gultsch 5695236838 verify activity 2018-10-31 13:33:55 +01:00
Daniel Gultsch bdb8d98eb1 show snackbar for remote server timeout in mucs 2018-10-08 10:31:11 +02:00
Daniel Gultsch de0741bdf7 show cancelled instead of delivery failed if user requested to abort transfer 2018-10-07 14:59:08 +02:00
Daniel Gultsch 9816261569 introduced error code for server not opening stream after auth or starttls 2018-09-27 17:39:49 +02:00
Daniel Gultsch 1985f6bdec store avatars received over muc presence in contact 2018-09-21 12:27:58 +02:00
Daniel Gultsch 2d5bd539db sync roster after setting pgp id. fixes #2991 2018-09-08 12:46:15 +02:00
Daniel Gultsch be4c6bc2ca speed up DNS
run queries in parallel
decrease timeout
do not fall back to google
2018-09-08 11:30:20 +02:00
Daniel Gultsch 516b6dcc1f code cleanup for group chat user context menu 2018-09-02 20:54:50 +02:00
Daniel Gultsch ffc5d47091 Merge branch 'start_convervsations_by_long_press' of https://github.com/ChaosKid42/Conversations into ChaosKid42-start_convervsations_by_long_press 2018-09-02 15:02:03 +02:00
Christoph Scholz 3ecb7136c1 start new conversations by long press on avatar 2018-09-01 21:05:31 +02:00
Daniel Gultsch 201d8ab398 do not show 'delete contact' for phone contacts. do not treat as stranger 2018-08-31 11:04:45 +02:00
Daniel Gultsch 2febbe1b8d show jids from address book in Start Conversation screen if only one account is used 2018-08-30 18:45:22 +02:00
Daniel Gultsch 02b7b0b4a6 do grace period calculation only on positive periods 2018-08-18 18:20:58 +02:00
Daniel Gultsch fd28b32d56 call onMessageFound outside sync block 2018-07-22 22:42:32 +02:00
Daniel Gultsch 4871263d9c display propper toast after room has been destroyed 2018-07-11 21:33:27 +02:00
Daniel Gultsch 728c86222d do not add in_roster flag when restoring from disk 2018-07-09 11:06:23 +02:00
Daniel Gultsch 7b64a031cd store own affiliation and role to disk 2018-07-08 20:52:55 +02:00
Daniel Gultsch 48e366e410 support mam:1 2018-07-07 11:20:39 +02:00
Daniel Gultsch 0fa97bdc11 show snackbar for resource constraint in mucs 2018-07-07 10:28:31 +02:00
Daniel Gultsch 3218ca3fe3 shorten read markers to 'everyone has read up to this point' when > 4 user 2018-06-30 12:14:42 +02:00
Daniel Gultsch ee3438b03a use + as build metadata delimiter 2018-06-28 08:49:48 +02:00
Daniel Gultsch db03470eb4 fixed MucOptions.getName() 2018-06-27 17:17:44 +02:00
Daniel Gultsch e8a1f069c2 reset subject and name on empty 2018-06-24 16:33:15 +02:00
Daniel Gultsch e6532e739a do not include white listed domains in room list. fixes #3082 2018-06-22 20:25:50 +02:00
Daniel Gultsch 1fc432af53 use TextInputLayout in quickedit dialog 2018-06-22 17:42:52 +02:00
Daniel Gultsch 8a987f23f6 code clean up in contact details presence handling 2018-06-20 12:59:15 +02:00
Daniel Gultsch 6c27d07803 fixed some extended muc info handling. match what ejabberd does 2018-06-19 11:05:21 +02:00
Daniel Gultsch 159fedb358 use room name (if available and != localpart) as group name 2018-06-18 22:17:10 +02:00
Daniel Gultsch d7ebd7d453 WIP: set room avatar and slight redesign of group details 2018-06-18 14:15:19 +02:00
Daniel Gultsch f434925753 do not include read only chats in contact chooser. fixes #3077 2018-06-16 19:00:23 +02:00
Daniel Gultsch 582178991b deduplicate tags + translate 'blocked' tag 2018-06-16 18:14:49 +02:00
Daniel Gultsch 70d95c7903 upload files using p1s3 - sending part 2018-05-25 12:24:23 +02:00
Daniel Gultsch 2230d5a42c do not save draft if message is completly empty and fixed appending shared text 2018-05-19 14:30:42 +02:00
Daniel Gultsch e84a65bc86 do not load conversations with null jid 2018-05-09 11:09:01 +02:00
Daniel Gultsch 77fc8d2d9e encode and decode % and # in invite links 2018-05-04 12:18:31 +02:00
Daniel Gultsch 96224c0fc6 filter sequences of more than 3 ltr-rtl 2018-05-04 10:11:24 +02:00