Commit graph

576 commits

Author SHA1 Message Date
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