Commit Graph

585 Commits

Author SHA1 Message Date
Daniel Gultsch
8183c54ba0 use stanza-id for display markers in group chats 2020-04-28 08:25:21 +02:00
Daniel Gultsch
418cecad11 remove XEP-0357 support for group chats 2020-04-28 06:50:04 +02:00
Daniel Gultsch
5b98107e9a put jingle messages in MAM and parse call log during catchup 2020-04-20 15:57:30 +02:00
Daniel Gultsch
3439f40411 show call log messages in conversation stream 2020-04-20 15:57:30 +02:00
Daniel Gultsch
c5da699afe dont crash when fields names in caps are null 2020-04-20 15:53:52 +02:00
Daniel Gultsch
aecb771ab5 use 16 byte IVs for http upload files larger than 768KiB
Ever since Android 9+ switched to Conscrypt we can no longer efficiently
encrypt (and decrypt) large files with AES-GCM. We did’t notice this before
because when using 16 byte IVs even modern Androids will fall back to bouncy
castle. However the 'bug'/'feature' in Conscrypt surfaced when we switched over
to 12 byte IVs (which uses Conscrypt on Android 9+)
Switching back entirely to 16 byte IVs is undesirable as this would break
compatibility with Monal. So we end up with a weird compromise where we use
12 byte for normale plain text OMEMO messages and 'small' files where the
inefficiencies aren’t a problem.

The result of this commit is that Monal won’t be able to receive our files
larger than 768KiB. However the alternative is that Conversations would always
OOM when attempting to send larger files (where large depends on the available
RAM.)

fixes #3653
2020-03-08 13:13:19 +01:00
Daniel Gultsch
08bc3ca0d5 do not merge oob messages 2020-03-02 11:10:38 +01:00
Daniel Gultsch
9b55d90705 do not warn user if bookmark already exists
fixes #3631
2020-02-16 16:04:45 +01:00
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