Commit Graph

152 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
e714d7cd29 null checks when deleting old files
fixes #3345
2019-01-17 11:56:34 +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
bcfd3f20c2 postpone prekey removal and republish to after mam 2018-12-05 10:42:56 +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
45dba15376 one time migration for existing quicksy account to set magic create flag 2018-11-25 20:47:50 +01:00
Daniel Gultsch
6d67854086 catch cursor window allocation exception 2018-11-13 09:58:28 +01:00
Daniel Gultsch
3e1d01798c refresh synced contacts even if offline 2018-10-31 13:33:55 +01:00
Daniel Gultsch
284861de65 Do not attempt to draw overlay on null bitmap 2018-10-07 13:44:20 +02:00
Daniel Gultsch
1985f6bdec store avatars received over muc presence in contact 2018-09-21 12:27:58 +02:00
Daniel Gultsch
7a0c53aa71 introduce media browser activity 2018-09-15 21:10:17 +02:00
Daniel Gultsch
06972ec95c show conversation media in contact/conference details 2018-09-15 19:38:45 +02:00
Daniel Gultsch
dfb95f0a84 persist muc avatar and show in bookmarks 2018-06-30 13:35:17 +02:00
Daniel Gultsch
a149f0db27 set pragme secure delete properly 2018-05-20 18:01:47 +02:00
Alexander
df64d965a0 explicitly set secure_delete pragma for SQLite database (#3039)
Conversations stores sensitive data, such as SQLiteAxolotlStore tables, in its database.

secure_delete=ON is the default for newer Android devices:
https://android-review.googlesource.com/c/platform/external/sqlite/+/209123

However, older devices had it disabled by default, so any database created than has this setting disabled and it will not be updated automatically.

Also, the default might be changed in the future (for example, to "FAST", added in 2017), so it is safer to set it explicitly.
2018-05-20 16:50:27 +02:00
Alexander
9bff9900d1 move enabling of foreign key support to onConfigure (#3038)
This way we avoid repeating the code. Unlike getWritableDatabase, onConfigure is intended to be overridden.

In fact, onConfigure documentation specifically says: "Called when the database connection is being configured, to enable features such as write-ahead logging or *foreign key support*."
2018-05-20 15:54:56 +02:00
Daniel Gultsch
be579332be do not use trigger but delete message index entries manually 2018-05-17 20:17:00 +02:00
Daniel Gultsch
b0db88c405 add primary key to fts table 2018-05-10 11:28:09 +02:00
Daniel Gultsch
5b41906328 do not include body in simple status updates to not trigger fts update 2018-05-10 10:47:28 +02:00
Daniel Gultsch
e84a65bc86 do not load conversations with null jid 2018-05-09 11:09:01 +02:00
Daniel Gultsch
2505ac8b77 only search text messages 2018-05-01 09:58:43 +02:00
Daniel Gultsch
27f31446c0 search term parsing + highlighting 2018-04-30 17:09:55 +02:00
Daniel Gultsch
542a06f08a creat fts table 2018-04-30 16:06:27 +02:00
Daniel Gultsch
e6feb91390 properly cancel pending searchs and scroll to bottom after refresh 2018-04-26 17:02:31 +02:00
Daniel Gultsch
35020702fb very much unoptimized search functionality 2018-04-26 13:22:31 +02:00
Daniel Gultsch
e2ff51db08 add debug output to how many messages were deleted 2018-04-25 19:32:43 +02:00
Daniel Gultsch
fc62cbbc52 fixed updating of server message id after dedup 2018-04-21 19:35:25 +02:00
Daniel Gultsch
b501f4cf72 search for muc pms when fetching last mam reference 2018-04-21 16:57:29 +02:00
Daniel Gultsch
9908af6286 sync roster to disk after roster push 2018-03-18 12:24:28 +01:00
Daniel Gultsch
ca625f1e8e fix register account checkbox glitch 2018-03-13 11:54:34 +01:00
Daniel Gultsch
1accf9d961 migrate to xmpp-addr 2018-03-07 22:30:36 +01:00
Daniel Gultsch
78fd19195d finished 'Set Status Message' dialog 2018-03-07 22:30:36 +01:00
Daniel Gultsch
b393f54a03 get rid of customizable resources 2018-03-07 22:30:35 +01:00
Daniel Gultsch
78c5c508b3 permanently cache last resolver result 2018-01-21 20:41:30 +01:00