Commit graph

306 commits

Author SHA1 Message Date
Daniel Gultsch eed5c5e743 add additional logging to image compression 2022-01-18 09:49:10 +01:00
Alexei Sorokin 951d84f404 make sure messages_index is always cleaned up fully. fixes #4170 2021-09-20 06:26:35 +00:00
Daniel Gultsch 68d8e2b9cf delete targe file after unsuccessful image compression 2021-09-11 09:55:44 +02:00
Daniel Gultsch 8b817b3bd8 add database migration for new fts scheme 2021-09-07 16:47:40 +02:00
Alexei Sorokin 754773be55 match messages from the full-text index by rowid
"uuid" is a primary key in "messages" but not in "messages_index",
the implication of that is very slow matching by UUID.

What can be done instead is matching messages_index.rowid to messages.rowid,
that is, an always-present clustered index.

This not only improves performance of full-text search but also of just
updating messages in any shape or form.
2021-09-07 16:19:49 +02:00
Alexei Sorokin 4f362aafac make the fulltext index for search more space-efficient
It now uses the data from the messages table instead of having a copy of each
message.

The message UUIDs are no longer part of the index.
2021-09-07 16:19:40 +02:00
Daniel Gultsch ea0dc558cb use androidx ExifInterface to parse rotation. fixes #4154 2021-09-05 16:29:24 +02:00
Alexei Sorokin b99f9d4f1c make search case-insensitive not only for ASCII 2021-05-26 06:16:20 +00:00
Daniel Gultsch 77f448692c catch security exception when reading file 2021-03-24 10:47:50 +01:00
Daniel Gultsch 739d20428a optimize imports 2021-03-21 21:39:04 +01:00
Daniel Gultsch e217551a82 migrate to OkHttp instead of HttpUrlConnection
OkHttp gives us more fine grained control over the HTTP library and frees us from any platform bugs
2021-03-19 14:57:20 +01:00
Daniel Gultsch 0812bae1ab do not run alpha check on jpegs 2021-02-20 10:08:43 +01:00
Daniel Gultsch 358c70828f close inputstream in image meta data analysers 2021-01-31 10:13:20 +01:00
maxim432 156c4da2b3 Fix couple of leaks 2021-01-30 17:56:54 -08:00
Daniel Gultsch ca496fd39f look at only subset of pixels to check for alpha 2021-01-30 01:50:03 +01:00
Daniel Gultsch 2155a50875 do not compress images with alpha channels 2021-01-29 21:25:00 +01:00
Daniel Gultsch 8ce7bfb95e automated code clean up 2021-01-23 09:25:34 +01:00
Daniel Gultsch e711b3d294 remember last rtp capability 2021-01-22 08:24:19 +01:00
Ferdinand Pöll 453ca7c0ed Migrate from Android Support Library to AndroidX
Unignored gradle.properties since androidX requires additions there
See also https://developer.android.com/jetpack/androidx/migrate
2021-01-18 20:49:35 +01:00
Daniel Gultsch 2bec5459c5 properly null check ufrag and pwd before whitespace checking. fixes #3956 2021-01-03 16:05:17 +01:00
Daniel Gultsch f584179f2f store avatars in cache folder 2020-12-10 19:05:04 +01:00
Daniel Gultsch 3dcb36a417 persist presence name (pep, nick in subscribe) to DB. fixes #3856 2020-08-31 09:03:54 +02:00
Daniel Gultsch 35af8894d2 search individual conversations. fixes #3243 2020-08-29 08:16:08 +02:00
Daniel Gultsch 7e2d87f39c recover if attachImage can’t generate scalled down version of image. fixes #3773 2020-06-09 21:08:27 +02:00
Daniel Gultsch 22f3aac465 fix media browser for escapbed jids 2020-05-18 11:48:24 +02:00
Daniel Gultsch a0920b83e2 use Account.getDomain() for direct access to domain jid 2020-05-17 10:24:46 +02:00
Daniel Gultsch b6703dbe38 switch xmpp-addr to jxmpp-jid 2020-05-15 17:06:16 +02:00
Daniel Gultsch 1d62cb0024 pdf renderer might throw security exception on password protected pdf 2020-04-20 15:57:06 +02:00
Daniel Gultsch d64bc1776b show pdf previews in media browser
fixes #3639
2020-02-14 16:02:15 +01:00
Daniel Gultsch a06eb10ed8 fixed rendering of transparent pdfs; white overlay for very dark pdf 2020-02-12 09:09:34 +01:00
Daniel Gultsch fc2b27c3b4 create pdf overlay for pdf thumbs 2020-02-11 19:55:31 +01:00
Daniel Gultsch 2aee26c49a display PDF previews 2020-02-11 17:41:54 +01:00
Daniel Gultsch 843d7fe12d evict cached previews when file gets deleted 2020-01-20 10:54:55 +01:00
Daniel Gultsch ed4a73e1c7 persist file size across aborts
fixes #3601
2019-12-26 19:01:01 +01:00
Daniel Gultsch 8d245fc754 don’t use secure delete when migrating edit column 2019-12-08 11:33:09 +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 a99d7a7400 increase cursor window size on Android P when restoring messages 2019-12-02 13:20:53 +01:00
Daniel Gultsch ab516299e7 catch all exceptions when closing closable 2019-10-23 22:34:25 +02:00
Daniel Gultsch aef394c9f0 ability to open files from media preview. fixes #3521 2019-09-29 02:00:06 +02:00
Daniel Gultsch 863ac7f2e5 show resource prompt when sending uncompressed video 2019-09-28 23:56:02 +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 1c413edf06 bare minimum direct connections 2019-09-01 15:06:59 +02:00
Daniel Gultsch 98c4e9056f use helper method to close socket 2019-07-04 10:12: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 c7dea9dded fixed security exception when attempting to display image in notification 2019-03-03 08:32:54 +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 2e0db4dcda do not show installed accounts in restore view 2019-01-23 12:45:15 +01:00
Daniel Gultsch c9fc40dfe5 WIP backup & restore 2019-01-22 19:25:45 +01:00
Daniel Gultsch e714d7cd29 null checks when deleting old files
fixes #3345
2019-01-17 11:56:34 +01:00