Compare commits

...

373 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] f0e95a59d1 Simplify sendComplete: remove chatId param and dead refreshFragment logic
sendComplete is only ever called from the message-send path, never the
draft path, so the passed chatId always equals this.chatId. The
refreshFragment branch and this.chatId = chatId assignment were dead
code. Removing them also eliminates the class of bug where an old
chatId could accidentally revert the activity's current chat.

Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
2026-03-13 20:09:26 +00:00
copilot-swe-agent[bot] d44ad7de0c Fix introduced bug: restore sendComplete to use dcChat.getId()
The previous fix captured `currentChatId` to stop the setDraft race
condition, but also changed `sendComplete(dcChat.getId())` to
`sendComplete(currentChatId)`. Java lambdas access instance fields via
`this`, so `dcChat.getId()` in the lambda reads the current value when
it runs — after `initializeResources()` updates `dcChat` to the private
chat, `sendComplete` naturally received the private chat ID. Passing
`currentChatId` (old group chat ID) instead caused `sendComplete` to
write `this.chatId = GROUP_CHAT_ID`, reverting the activity to the old
chat and triggering an unwanted fragment reload.

Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
2026-03-13 20:00:04 +00:00
copilot-swe-agent[bot] 3e0a283633 Fix: reply privately sometimes doesn't quote the message
Two fixes for the race condition that caused "reply privately" to
sometimes open the 1:1 chat without the quoted message:

1. In processComposeControls(), capture dcChat.getId() as currentChatId
   before the background thread starts. Without this, initializeResources()
   can change dcChat to the new private chat before the background thread
   runs, causing it to overwrite the quote draft with an empty/wrong draft.

2. In InputPanel.setQuote(), if getMeasuredHeight() returns 0 after
   measure(0,0) (view not yet laid out), fall back to WRAP_CONTENT instead
   of animating to 0 height which would keep the quote view at 1px height.

Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
2026-03-13 18:00:02 +00:00
copilot-swe-agent[bot] ac01395482 Initial plan 2026-03-13 17:36:33 +00:00
adb fc1adc4863 Merge pull request #131 from ArcaneChat/adb/merge-upstream
merge upstream
2026-03-11 20:18:26 +01:00
adbenitez d68c32ff26 fix ProgressDialog 2026-03-11 20:16:29 +01:00
adbenitez b67e9d795e Merge remote-tracking branch 'upstream/main' into adb/test 2026-03-11 20:02:57 +01:00
adbenitez ae7be8a841 apply code formatter 2026-03-11 18:53:16 +01:00
adb 1894425ad2 Merge pull request #4271 from deltachat/adb/apply-code-format4
apply code formatter, part 4
2026-03-11 17:29:32 +01:00
adbenitez 3460e7e405 apply code formatter, part 4 2026-03-11 17:10:29 +01:00
adb ca40ae7869 Merge pull request #4270 from deltachat/adb/apply-code-format3
apply code formatter part 3
2026-03-11 17:01:17 +01:00
adbenitez cb05abb85f apply code formatter part 3 2026-03-11 16:33:21 +01:00
adb 8a76f99701 Merge pull request #4269 from deltachat/adb/apply-code-format2
apply code formatter part 2
2026-03-11 14:34:13 +01:00
adbenitez fd5a3b9f8e apply code formatter part 2 2026-03-11 14:16:44 +01:00
adb 6cab1d1cf4 Merge pull request #4268 from deltachat/adb/apply-code-format1
apply code format part 1
2026-03-11 14:06:27 +01:00
biörn be8009c950 fix: leave and delete finishes activity (#4266)
* fix: leave and delete finishes activity

the chat is gone - otherwise, we end up in ghost chat zero :)

moreover, the fix removes shortcuts from the homescreen.

a toast is no longer needed, as there is enough visual feedback;
we're also not showing a toast on plain deletion.

* use consistent string and clarify deletion scope
2026-03-11 14:01:34 +01:00
adbenitez f6c1fa2f5c apply code format part 1 2026-03-11 13:40:09 +01:00
biörn 6949be6fd8 leave and delete (#4262)
* deleting groups/channels is available after leaving only

* update CHANGELOG

* Update src/main/java/org/thoughtcrime/securesms/ConversationActivity.java

Co-authored-by: adb <adb@merlinux.eu>

* mailing lists are not encrypted

---------

Co-authored-by: adb <adb@merlinux.eu>
2026-03-11 00:40:04 +01:00
adb f95a6e8db7 Merge pull request #4264 from deltachat/adb/make-encr-info-selectable
make it possible to select/copy the fingerprints in encryption info dialog
2026-03-10 21:14:02 +01:00
biörn b81757d579 simplify 'call' wording (#4263) 2026-03-10 20:33:26 +01:00
adbenitez 30c0026840 make it possible to select/copy the fingerprints in encryption info dialog 2026-03-10 19:40:06 +01:00
adbenitez efb4bf0536 Merge remote-tracking branch 'upstream/main' 2026-03-10 19:08:40 +01:00
adb cd2fc0df0f Merge pull request #4230 from deltachat/adb/sticker-picker
add basic sticker picker
2026-03-10 14:49:17 +01:00
adbenitez 51380cf906 update changelog 2026-03-09 20:47:03 +01:00
adbenitez ded0c44ce3 improve StickerPickerView's code 2026-03-09 20:45:46 +01:00
adbenitez 61f5064929 move setupViews() to onFinishInflate() 2026-03-09 19:07:19 +01:00
adb f316ebea20 Merge branch 'main' into adb/sticker-picker 2026-03-09 18:18:24 +01:00
wchen342 dc1a029e4a Merge pull request #4250 from deltachat/wch423/remove-notification-msg-delete
Remove notification when message is deleted
2026-03-09 13:03:31 -04:00
wchen342 6bbacae54d Merge branch 'main' into wch423/remove-notification-msg-delete 2026-03-09 12:52:26 -04:00
wch423 972d372bd4 Add back exception handling for notify() 2026-03-09 17:17:28 +01:00
biörn fe7fb19adf add a hint about sending original images (#4259)
* add a hint about sending original images

* force items having needed size
2026-03-09 16:49:36 +01:00
biörn 5112389dae remove unused CustomDefaultPreference (#4257)
* remove unused CustomDefaultPreference

* remove now superfluous null check

* remove now unused resources
2026-03-09 16:48:17 +01:00
biörn c190a7b50a update some call translator notes (#4256) 2026-03-09 12:08:19 +01:00
biörn 7ce8ccff78 unify status line (#4255)
* less formal duration string

* use standard status footer

* move call icon to call information

* add duration line

* update CHANGELOG
2026-03-09 10:54:54 +01:00
biörn 7eb0a99fc7 add strings for the 'Calls' notification setting (#4249)
* add strings for the 'Calls' notification setting

* Update src/main/res/values/strings.xml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/main/res/values/strings.xml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-09 01:21:29 +01:00
adb cbdd8f19ed Merge branch 'main' into wch423/remove-notification-msg-delete 2026-03-06 17:15:28 +01:00
adb 5fdf319cda Merge pull request #4254 from deltachat/Hocuri-patch-1
CI: Change preview APK architecture from 32-bit to 64-bit
2026-03-06 14:55:48 +01:00
wch423 837e2313dd Make notifications rebuild up on message deletion 2026-03-06 00:26:59 +01:00
Hocuri e45fd2545e Change build target from armeabi-v7a to arm64-v8a 2026-03-05 18:27:08 +01:00
wch423 15537ea4b2 Remove notification when message is deleted 2026-03-05 00:40:10 +01:00
B. Petersen df97f4069a remove deprecated strings 2026-03-03 23:57:10 +01:00
B. Petersen dea8b2bed9 tweak 'view count' translator's hint 2026-03-02 16:54:56 +01:00
B. Petersen 0d130a4218 add view-count string 2026-03-01 13:24:38 +01:00
adbenitez b4ee89c1e8 Merge remote-tracking branch 'upstream/main' 2026-02-27 18:56:48 +01:00
adb b2e7b8fdb6 Merge branch 'main' into adb/sticker-picker 2026-02-27 18:51:14 +01:00
adb a494feb272 Merge pull request #4245 from deltachat/update-core-and-stuff-2026-02-27
Update core to 2.44.0
2026-02-27 18:49:20 +01:00
adbenitez 5efce4345a update RPC 2026-02-27 18:45:37 +01:00
adbenitez b7703ce71f update changelog 2026-02-27 17:25:24 +01:00
adbenitez c0ed32b645 update translations 2026-02-27 17:25:11 +01:00
adbenitez 7e4f408059 update deltachat-core-rust to 'chore(release): prepare for 2.44.0' of 'v2.44.0' 2026-02-27 17:18:33 +01:00
adbenitez a1993426de Merge remote-tracking branch 'upstream/main' 2026-02-24 01:30:11 +01:00
adbenitez bbb6ce8def fix ConversationFragment 2026-02-24 01:29:39 +01:00
adb c601595477 Merge pull request #4238 from deltachat/adb/avoid-deprecated-onActivityResult
migrate away from deprecated `Fragment.onActivityResult()`
2026-02-23 19:11:30 +01:00
adbenitez f909174119 tweak ConversationListActivity and RelayListActivity
don't relay in onActivityResult
2026-02-23 18:59:54 +01:00
adbenitez b0762a8b46 Merge remote-tracking branch 'upstream/main' 2026-02-22 13:00:11 +01:00
adb 545f987f31 Merge branch 'main' into adb/avoid-deprecated-onActivityResult 2026-02-21 23:48:11 +01:00
adb b625c57d2d Merge pull request #4240 from deltachat/adb/improve-channel-creation
don't set channel description on channel creation if it is empty
2026-02-21 23:47:57 +01:00
adbenitez 022d24bc5f Merge branch 'adb/improve-channel-creation' of https://github.com/deltachat/deltachat-android into adb/improve-channel-creation 2026-02-21 23:47:20 +01:00
adbenitez c5c09008a6 fix missing parenthesis 2026-02-21 23:47:03 +01:00
adb 7679cc8bba Merge branch 'main' into adb/avoid-deprecated-onActivityResult 2026-02-21 23:34:03 +01:00
adb 4807d05861 Merge branch 'main' into adb/improve-channel-creation 2026-02-21 23:33:20 +01:00
adb 34eedf5f07 Merge pull request #4239 from deltachat/adb/improve-description-changed-info-clicked
when "description changed by Foo" is clicked, open chat profile
2026-02-21 23:32:57 +01:00
adbenitez 941c186142 don't set channel description on channel creation if it is empty
when user creates a channel, only call rpc.setChatDescription if
there is actually some description to set, otherwise there will be a
"you changed the description" info-message when the user didn't set anything
2026-02-21 23:10:37 +01:00
adbenitez b54ac50ea5 when "description changed by Foo" is clicked, open chat profile 2026-02-21 22:59:19 +01:00
adb b99426b7c6 Merge pull request #118 from ArcaneChat/copilot/setup-copilot-instructions-again
Enhance Copilot instructions with build timing, CI/CD details, and troubleshooting
2026-02-19 05:33:38 +01:00
adbenitez de1eedc63f update .github/copilot-instructions.md 2026-02-19 05:32:04 +01:00
adbenitez c3dac043cb remove ScreenLockUtil.applyScreenLock(Activity, String, String, int) 2026-02-19 04:59:24 +01:00
adbenitez 00b52d4fe6 don't call registerForActivityResult in onActivityCreated 2026-02-19 03:34:05 +01:00
adbenitez b66bf595e2 avoid call to fragment.onActivityResult in ApplicationPreferencesActivity 2026-02-19 03:08:46 +01:00
adbenitez 7c24e836fe avoid deprecated ContactSelectionListFragment.onActivityResult() 2026-02-19 02:26:09 +01:00
adbenitez 694f3bf013 remove unused import in ListSummaryPreferenceFragment 2026-02-19 02:08:47 +01:00
adbenitez f6f42991e8 avoid deprecated NotificationsPreferenceFragment.onActivityResult() 2026-02-19 02:08:24 +01:00
adbenitez 23f6803be9 avoid deprecated ChatsPreferenceFragment.onActivityResult()
also remove now unused fields in `ListSummaryPreferenceFragment`
2026-02-19 00:05:39 +01:00
adbenitez cdcb7fab4b avoid deprecated AdvancedPreferenceFragment.onActivityResult() 2026-02-18 23:53:30 +01:00
adbenitez 5ee3607312 avoid deprecated ConversationFragment.onActivityResult() 2026-02-18 23:32:54 +01:00
adbenitez 4b9642f51f add more logging to ProfileFragment 2026-02-18 23:29:54 +01:00
adbenitez 4abbf3091f avoid deprecated in ProfileFragment.onActivityResult() 2026-02-18 22:58:21 +01:00
copilot-swe-agent[bot] ec4db3e58f Enhance Copilot instructions with detailed build, test, and CI/CD information
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
2026-02-18 20:52:39 +00:00
copilot-swe-agent[bot] 0d2175b641 Initial plan 2026-02-18 20:49:42 +00:00
adb a821ee363a Merge branch 'main' into adb/sticker-picker 2026-02-18 19:59:07 +01:00
adb f43083acef Merge pull request #4214 from deltachat/adb/chat-description
allow to set chat description
2026-02-18 19:58:02 +01:00
adb 7aed78a935 Update src/main/res/values/strings.xml
Co-authored-by: biörn <r10s@b44t.com>
2026-02-18 19:34:59 +01:00
adbenitez 26c30fe3dc Merge branch 'adb/chat-description' of https://github.com/deltachat/deltachat-android into adb/chat-description 2026-02-18 19:32:49 +01:00
adbenitez 5550b8b1f5 update changelog 2026-02-18 19:32:00 +01:00
adb c94512fb24 Merge branch 'main' into adb/chat-description 2026-02-18 19:30:30 +01:00
B. Petersen d1db6e5a8a apply suggestion from @wchen342 2026-02-18 14:44:56 +01:00
B. Petersen d352583237 avoid 'recode', which is too technical as well 2026-02-18 14:44:56 +01:00
B. Petersen c8469be136 clearify, how to recode multiple videos 2026-02-18 14:44:56 +01:00
adb 97620b8a3c Merge pull request #114 from ArcaneChat/copilot/improve-attachment-selector
Convert attachment selector to horizontal scrollable row with uniform cell sizing
2026-02-18 04:40:13 +01:00
adbenitez 24317b38bf tweak src/main/res/layout/attachment_type_selector.xml 2026-02-18 04:35:01 +01:00
copilot-swe-agent[bot] 6b28ed15e3 Fix cell sizing: uniform width with ellipsized text
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
2026-02-18 03:02:49 +00:00
copilot-swe-agent[bot] b8b203e517 Convert attachment selector from fixed grid to scrollable row
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
2026-02-18 02:47:04 +00:00
copilot-swe-agent[bot] e5c1e477f0 Initial plan 2026-02-18 02:44:54 +00:00
adbenitez 64752d3bae Merge remote-tracking branch 'upstream/adb/chat-description' 2026-02-17 23:39:53 +01:00
adbenitez 6145e0d2df Merge remote-tracking branch 'upstream/main' 2026-02-17 23:29:06 +01:00
adbenitez b365284743 fix Rpc class 2026-02-17 22:37:56 +01:00
adb af62041c14 Merge branch 'main' into adb/chat-description 2026-02-17 22:36:07 +01:00
adbenitez 910dbf56fd update core 2026-02-17 22:34:55 +01:00
adb 4eca0dea4a Merge pull request #4237 from deltachat/prep-2.43.0
prepare 2.43.0
2026-02-17 22:24:24 +01:00
adbenitez a76c17fd45 prepare 2.43.0 2026-02-17 21:50:36 +01:00
adb b00aeec03a Merge pull request #4236 from deltachat/update-core-and-stuff-2026-02-17
Update core to 2.43.0
2026-02-17 21:15:35 +01:00
adbenitez ffe147fde8 update RPC bindings 2026-02-17 21:09:06 +01:00
adbenitez 02a5bb06a9 update translations 2026-02-17 21:08:44 +01:00
adbenitez a8997738bf update changelog 2026-02-17 20:07:51 +01:00
adbenitez 202690d02e update deltachat-core-rust to 'chore(release): prepare for 2.43.0' of 'v2.43.0' 2026-02-17 20:04:23 +01:00
wchen342 6d14bbdbc7 Merge pull request #4234 from deltachat/wch423/fix-audio-seekbar-reset
Prevent seek bar from being reset when message list changes
2026-02-17 14:03:08 -05:00
adbenitez b0699ab9be sort stickers 2026-02-17 18:04:56 +01:00
wch423 03a0b53eee Update function name 2026-02-17 16:34:33 +01:00
wch423 a044181a75 Update progress bar for playing audio; Clear progress for any other audio that is not playing to avoid confusion 2026-02-17 16:31:06 +01:00
B. Petersen e9ae9dc5bf add more translation context to strings 2026-02-17 15:27:13 +01:00
B. Petersen cbfa3b7e58 clarify 'Audio' string 2026-02-17 13:52:21 +01:00
adbenitez 499f4aafc8 add basic sticker picker 2026-02-17 04:14:16 +01:00
adbenitez bf57d3bd73 add src/main/res/values-eu/strings_arcanechat.xml 2026-02-17 03:47:52 +01:00
adbenitez 6200f354ca set custom icon for debug build 2026-02-17 03:47:30 +01:00
wchen342 c8dfb08dcb Merge pull request #4228 from deltachat/wch423/fix-audio-duration
Add duration extraction for audio files
2026-02-16 16:03:06 -05:00
wch423 543e9d91e4 Make sure longs are always in range 2026-02-16 20:08:31 +01:00
wch423 dec5879919 Add duration extraction for audio files 2026-02-16 19:01:55 +01:00
wchen342 a1d21d8562 Merge pull request #4226 from deltachat/wch423/fix-video-crash
Fix video player crash
2026-02-16 04:55:34 -05:00
adbenitez 253ed877e5 add comment to src/main/res/values/strings_arcanechat.xml
hint to translators to point out that the channel is in English
2026-02-15 17:40:57 +01:00
wch423 b809d24ab1 Change PlayerView to StyledPlayerView to avoid conflict between ExoPlayer2 and Media3 2026-02-13 18:05:37 +01:00
adbenitez 78aee0a487 Merge remote-tracking branch 'upstream/main' 2026-02-13 02:19:21 +01:00
adb d16254c146 Merge pull request #4223 from deltachat/adb/issue-4208
remove old buttons in relays list
2026-02-12 20:10:01 +01:00
adb 7ab3ef8453 Merge pull request #4224 from deltachat/adb/issue-4207-part2
don't tint error icon red in chatlist and info-messages
2026-02-12 20:09:43 +01:00
adbenitez 4b695a3293 update changelog 2026-02-12 00:01:16 +01:00
adbenitez da4c382c9a add context menu to relay items 2026-02-11 23:58:48 +01:00
adbenitez 80973960f5 don't tint error icon red in chatlist and info-messages 2026-02-11 20:54:05 +01:00
adbenitez 7be75f7008 remove old buttons 2026-02-11 20:27:01 +01:00
adbenitez 6fa114c6c0 Merge remote-tracking branch 'upstream/main' 2026-02-11 20:22:37 +01:00
adbenitez 767b5f2bae update channel link 2026-02-11 20:04:59 +01:00
adb ed3a21b992 Merge pull request #4222 from deltachat/prep-2.42.0
prepare 2.42.0
2026-02-10 21:41:59 +01:00
adbenitez 899c2b5647 prepare 2.42.0 2026-02-10 21:24:21 +01:00
adb 61e616a53b Merge pull request #4221 from deltachat/update-core-and-stuff-2026-02-10
Update core to 2.42.0
2026-02-10 21:23:09 +01:00
adbenitez 3bf4504de9 update strings 2026-02-10 21:20:52 +01:00
adbenitez cd0740d895 update changelog 2026-02-10 20:31:58 +01:00
adbenitez 9f99edc159 update deltachat-core-rust to 'chore(release): prepare for 2.42.0' of 'v2.42.0' 2026-02-10 20:26:54 +01:00
wchen342 60568f23f5 Merge pull request #4217 from deltachat/wch423/onboarding-invite-code
Allow scanning invite codes from onboarding
2026-02-09 16:36:23 -05:00
wchen342 6dc8bd7ba8 Merge branch 'main' into wch423/onboarding-invite-code 2026-02-09 16:25:34 -05:00
wch423 ff4ecb3bda Fix missing callback on successful scan 2026-02-09 22:19:11 +01:00
wch423 c71e71359a Remove extra constant 2026-02-09 22:11:13 +01:00
wch423 d5a09fa25e Only show confirmation dialog if it is an invitation link for contact or group 2026-02-09 21:56:43 +01:00
adb f52c2be2c2 Merge pull request #4219 from deltachat/adb/disable-chat-edge-to-edge
disable insets change in setComposePanelVisibility()
2026-02-09 21:46:46 +01:00
wch423 2233b93108 Remove color change on the OK button 2026-02-09 21:42:06 +01:00
adbenitez d76eb3239a disable insets change in setComposePanelVisibility() 2026-02-09 21:05:00 +01:00
adb a982bd2bbb Merge branch 'main' into wch423/onboarding-invite-code 2026-02-09 18:52:33 +01:00
wchen342 9ef3edcc0e Merge pull request #4189 from deltachat/wch423/audio-background-play
Add background audio playback for voice messages
2026-02-09 12:45:01 -05:00
wch423 de7c54b886 Revert changes to rpc 2026-02-09 15:32:37 +01:00
adb 9c9f966597 Merge branch 'main' into wch423/audio-background-play 2026-02-09 02:24:54 +01:00
adb 12e77789d3 Merge branch 'main' into wch423/onboarding-invite-code 2026-02-09 02:24:39 +01:00
adb bd640072ab Merge pull request #4216 from deltachat/adb/avoid-races-loading-chatlist
use conversationListFragment.loadChatlistAsync() to avoid races
2026-02-09 01:00:38 +01:00
adb 0a9c46fbfc Merge branch 'main' into adb/avoid-races-loading-chatlist 2026-02-07 17:37:29 +01:00
wch423 1cc4f11484 Add CHANGELOG 2026-02-07 17:04:27 +01:00
wch423 9386f2f9cb Fix QR scanning not restarted after cancel 2026-02-07 16:56:49 +01:00
wchen342 45d73d4604 Merge pull request #4215 from deltachat/adb/issue-4207
tune down error icon, don't use special bright alarming color
2026-02-07 10:22:32 -05:00
Hocuri a5892330dd Translate stock strings 2026-02-07 11:30:40 +01:00
adbenitez 8a0e2d72a4 use conversationListFragment.loadChatlistAsync() to avoid races 2026-02-07 06:22:31 +01:00
adbenitez 2629c65564 tune down error icon, don't use special bright alarming color 2026-02-07 02:39:37 +01:00
adbenitez 10694a6809 display chat description in chat profile 2026-02-07 01:49:59 +01:00
adbenitez aa3d177243 allow to set chat description 2026-02-07 01:23:26 +01:00
adbenitez 4d35d4edeb temporarily select core branch with new chat description api 2026-02-06 23:08:53 +01:00
wch423 bbaba3cd33 Fix observer not added in a specific case 2026-02-06 22:30:35 +01:00
wch423 d1f002a132 Remove desugar and use AndroidX version of Consumer 2026-02-06 21:04:31 +01:00
wch423 9ce9a91c95 Add confirm dialog for invitation qr codes 2026-02-06 21:01:36 +01:00
wch423 7844e146b1 Join and launch chat directly after creating new account 2026-02-06 18:50:57 +01:00
adbenitez eb997eca00 fix bug introduced by upstream merge 2026-02-06 18:35:30 +01:00
adb 30124de2a8 Merge branch 'main' into wch423/audio-background-play 2026-02-06 18:34:56 +01:00
wch423 1dcf7e4860 Adding new text for scanning invite code when onboarding 2026-02-06 16:50:45 +01:00
B. Petersen 9ffc904ae5 more detailed call strings 2026-02-06 11:45:56 +01:00
wchen342 2704749b44 Merge pull request #4198 from deltachat/wch423/edge-to-edge-device-channel
Make device messages and subscribed channels edge to edge
2026-02-05 15:15:40 -05:00
wch423 1c174b5b70 Stop draft audio playback when (1) the conversation exits; or (2) the message is sent 2026-02-05 21:12:09 +01:00
adbenitez 8b5dd70d75 Merge remote-tracking branch 'upstream/main' 2026-02-05 20:25:35 +01:00
adb f022316ad7 Merge branch 'main' into wch423/audio-background-play 2026-02-05 19:44:50 +01:00
wch423 3386f5c5f7 Make !CanSend -> CanSend still trigger Inset changes 2026-02-05 19:07:43 +01:00
adb 57eead3a34 Merge branch 'main' into wch423/edge-to-edge-device-channel 2026-02-05 18:33:52 +01:00
adb 2868b51835 Merge pull request #4212 from deltachat/prep-2.40.0
prepare 2.40.0
2026-02-05 17:44:28 +01:00
wch423 82118db71b Make inset changes only happen on initialization of activity 2026-02-05 17:27:21 +01:00
adbenitez 14f55ca6b1 prepare 2.40.0 2026-02-05 17:25:20 +01:00
adb cebfa12142 Merge branch 'main' into wch423/edge-to-edge-device-channel 2026-02-05 16:55:30 +01:00
adb 96c8c21b78 Merge pull request #4209 from deltachat/adb/issue-4206
hide delete-contact icon in ContactSelectionListFragment
2026-02-05 16:55:07 +01:00
adb 9ab1b1f3a7 Merge branch 'main' into adb/issue-4206 2026-02-05 16:54:55 +01:00
adb 94a0e426f8 Merge pull request #4210 from deltachat/adb/allow-to-pick-call-mode
show menu to select audio/video call modes
2026-02-05 16:48:27 +01:00
adbenitez 006f8ae826 use hasVideo instead of audioOnly 2026-02-05 16:37:42 +01:00
wch423 2889266522 Force dispatch all inset changes immediately in ConversationFragment 2026-02-05 16:28:38 +01:00
adb 5e6fccf143 Merge branch 'main' into wch423/edge-to-edge-device-channel 2026-02-05 15:41:17 +01:00
adbenitez 3847e20d18 set tint for icons in the call submenu 2026-02-05 02:31:38 +01:00
adbenitez fc69212a51 update changelog 2026-02-05 01:41:29 +01:00
adbenitez 8999f54ba2 upgrade calls web app 2026-02-05 01:40:27 +01:00
adbenitez f470e92300 show different icon depending on voice/video call modes 2026-02-05 01:35:20 +01:00
adbenitez 3ac49e3e58 set the call mode when calling Rpc.placeOutgoingCall 2026-02-05 01:20:11 +01:00
adb 8dd9cfec5b Merge branch 'main' into adb/allow-to-pick-call-mode 2026-02-05 01:17:12 +01:00
adb 0588214ee7 Merge pull request #4211 from deltachat/update-core-and-stuff-2026-02-04
Update core to 2.40.0
2026-02-05 00:37:53 +01:00
adbenitez 4ec49a031c adapt to new Rpc.placeOutgoingCall API 2026-02-05 00:24:51 +01:00
adbenitez a31d7d6d3e update the RPC bindings 2026-02-04 23:39:04 +01:00
adbenitez 64bbe9866d update translations 2026-02-04 23:38:33 +01:00
adbenitez 5d7ab84efc update changelog 2026-02-04 23:35:14 +01:00
adbenitez 11f73a88e8 update deltachat-core-rust to 'chore(release): prepare for 2.40.0' of 'v2.40.0' 2026-02-04 23:31:30 +01:00
adbenitez dd0e847976 take into consideration if the call is audio/video call when accepting it 2026-02-04 23:17:42 +01:00
wch423 71ed333468 Stop playback when attachment preview is removed;
Stop playback when message containing audio is removed
2026-02-04 22:49:18 +01:00
adbenitez 41d94ae3ee if it is an audio-only call start with video disabled 2026-02-04 22:14:50 +01:00
wch423 b66bc1f863 Handle specific case when leaving group; also move floating button to avoid overaapping with system bar 2026-02-04 19:36:51 +01:00
adbenitez df7d80319c show menu to select audio/video call modes 2026-02-04 19:36:34 +01:00
adbenitez 134145d166 update changelog 2026-02-04 17:13:48 +01:00
adbenitez 688a103c10 hide delete-contact icon in ContactSelectionListFragment 2026-02-04 16:45:29 +01:00
adb e2efa1f913 Merge pull request #4201 from deltachat/adb/issue-4195
fix mailto handling and remove unused code
2026-02-03 23:27:48 +01:00
adb aebd5c66f7 Merge branch 'main' into wch423/audio-background-play 2026-02-03 21:51:02 +01:00
adbenitez 15c60c6b12 fix mailto handling 2026-02-03 20:57:47 +01:00
wch423 f319ba2b83 Allow list scrolling to extend to edge 2026-02-03 19:40:02 +01:00
wch423 93f12e7367 Make message list respect bottom bar height 2026-02-03 19:40:00 +01:00
wch423 10acb07f82 Make device messages and subscribed channels edge to edge 2026-02-03 19:39:56 +01:00
adb ee9a8dd53a Merge branch 'main' into adb/issue-4195 2026-02-03 18:22:39 +01:00
adb 0a55023bdb Merge pull request #4205 from deltachat/adb/issue-4202
remove deselected members
2026-02-03 18:22:02 +01:00
adb fec9f8b4d3 Merge pull request #4204 from deltachat/adb/issue-4203
Fix layout problems inside in-chat apps
2026-02-03 17:53:22 +01:00
wch423 13374df709 Bug fixes and minor changes 2026-02-03 17:41:31 +01:00
adbenitez 7fa04dc3c0 update changelog 2026-02-03 01:03:05 +01:00
adbenitez 9d4e0e4e21 remove deselected members 2026-02-03 00:40:00 +01:00
adbenitez 473c28ab07 Fix layout problems inside in-chat apps 2026-02-02 20:31:42 +01:00
adbenitez de47feac40 update changelog 2026-01-30 20:21:48 +01:00
adbenitez 84894ff538 fix mailto handling and remove unused code 2026-01-30 20:17:04 +01:00
adb f254c35749 Merge pull request #4199 from deltachat/r10s/improve-details-strings
message info: title-case the send/received titles
2026-01-30 17:48:37 +01:00
adb 1ff4e069ea Merge branch 'main' into wch423/audio-background-play 2026-01-29 22:17:24 +01:00
B. Petersen d574d33596 title-case the message-info send/received titles
we nowhere in the app use lower case field names
2026-01-29 18:33:57 +01:00
wchen342 f6756fc34b Merge pull request #4191 from deltachat/adb/issue-4157
use event emmiter before DcAccounts creation
2026-01-29 10:34:57 -05:00
wchen342 7c27eb47fc Merge pull request #4196 from deltachat/adb/issue-4194
avoid crash caused by custom Fragment constructors
2026-01-29 10:19:15 -05:00
adbenitez 8d5a55c24c update changelog 2026-01-29 03:47:53 +01:00
adbenitez 2e9aa79b02 simplify changes in AccountSelectionListFragment 2026-01-29 03:44:42 +01:00
adbenitez 1f9264225b remove custom constructor in ReactionsDetailsFragment 2026-01-29 03:30:17 +01:00
adbenitez 18e145faaf avoid custom constructor in AccountSelectionListFragment 2026-01-29 02:17:06 +01:00
adbenitez 47cf70120a add logcat to crash report 2026-01-28 23:21:37 +01:00
adbenitez 86451a00ff Merge remote-tracking branch 'upstream/main' 2026-01-28 22:28:40 +01:00
wch423 34be7aab17 Cleanup imports 2026-01-28 21:30:51 +01:00
wch423 59139ed242 Add support for attachment draft; Distinguish between different messages; Prevent unrelated activities from changing the pending intent 2026-01-28 21:28:43 +01:00
wch423 11f3964bdc Add support for attachment draft; Distinguish between different messages 2026-01-28 21:28:42 +01:00
wch423 7683408d18 Allow going back to previous activity from the notification; Support AllMediaActivity 2026-01-28 21:28:40 +01:00
wch423 b74e793654 Finish ViewModel for audio playback; Refine UI set up for AudioView 2026-01-28 21:28:38 +01:00
wch423 4bd74324d2 Try to decouple view and business logics 2026-01-28 21:28:36 +01:00
wch423 9a121b3039 Fix UI update problems;
Make notification clickable
2026-01-28 21:28:33 +01:00
wch423 a9832c9c53 Make audio view use Media3 for playback 2026-01-28 21:28:31 +01:00
adbenitez 1e4c8bc291 use event emmiter before DcAccounts creation 2026-01-27 19:05:38 +01:00
wchen342 c45a47e53c Merge pull request #4187 from deltachat/adb/issue-4176
show views count in channels (to the admin)
2026-01-27 09:35:25 -05:00
adb a07723d515 Merge branch 'main' into adb/issue-4176 2026-01-27 03:02:39 +01:00
adb 02d7a6fb1f Merge pull request #4190 from deltachat/adb/crash-sooner-in-DcAccounts
throw exception if DcAccounts.createAccountsCPtr() returned null pointer
2026-01-27 03:02:15 +01:00
adb d62e8fa864 Merge branch 'main' into adb/crash-sooner-in-DcAccounts 2026-01-27 01:25:30 +01:00
adbenitez a03fd337ef throw exception if createAccountsCPtr() returned null pointer 2026-01-27 01:20:27 +01:00
72374 27c0f45430 fix: Change maximum height and width of avatar-images to the maximum allowed by Chatmail Core (#4185)
Avatar-images with a resolution larger than 512x512 will be resized by Chatmail Core, while media-quality is set to balanced, which is currently the highest quality-setting.

Co-authored-by: Hocuri <hocuri@gmx.de>
2026-01-26 23:27:56 +00:00
adbenitez a0f1232261 update changelog 2026-01-26 22:30:57 +01:00
adbenitez 5640d31080 remove checkmark from chatlist for outgoing channel messages 2026-01-26 22:29:03 +01:00
adbenitez 1542fc67ca show number of views a channel message have 2026-01-26 21:31:41 +01:00
adbenitez a99a4ec85b hide delivery checkmark in channels 2026-01-26 18:23:55 +01:00
adb fa17b134cf Merge pull request #4180 from deltachat/adb/issue-4055
allow to switch profile while sharing/forwarding
2026-01-26 17:05:49 +01:00
adbenitez 6898a37704 fix WelcomeActivity 2026-01-24 02:44:18 +01:00
adbenitez 45b6a5c565 Merge remote-tracking branch 'upstream/main' 2026-01-24 02:44:04 +01:00
adb 7330e6ba39 Merge branch 'main' into adb/issue-4055 2026-01-24 00:57:40 +01:00
adb 8f405914a2 Merge pull request #4186 from deltachat/update-core-2.39.0
update core to 2.39.0
2026-01-24 00:57:09 +01:00
adbenitez 6d09a6f318 update changelog 2026-01-24 00:34:18 +01:00
adbenitez b349a7e601 update deltachat-core-rust to 'chore(release): prepare for 2.39.0' of 'v2.39.0' 2026-01-24 00:31:58 +01:00
adbenitez 0d610895d2 fix function 2026-01-23 22:13:59 +01:00
adbenitez a65c677ecc update changelog 2026-01-23 22:10:06 +01:00
adbenitez db93aeacc0 fix event listener in ConversationActivity 2026-01-23 22:05:41 +01:00
adb 09ff0d888b Merge branch 'main' into adb/issue-4055 2026-01-23 17:43:51 +01:00
adb b9c5e741e8 Merge pull request #4184 from deltachat/update-core-and-stuff-2026-01-23
Update core to 3.38.0
2026-01-23 17:43:28 +01:00
adbenitez 620d86c903 update RPC bindings 2026-01-23 17:41:25 +01:00
adbenitez 14e31650e7 update translations 2026-01-23 17:35:19 +01:00
adbenitez 9848cb5847 update changelog 2026-01-23 17:27:49 +01:00
adbenitez bf7db005ef update deltachat-core-rust to 'chore(release): prepare for 2.38.0' of 'v2.38.0' 2026-01-23 15:31:28 +01:00
adbenitez aa032dbb37 fix some bugs
* avoid using wrong DcContext after switching account in ConversationListActivity
* avoid getContext() in ConversationFragment, use Rpc instead
2026-01-22 20:45:33 +01:00
adbenitez 9e1b9775e2 fix ConversationListActivity 2026-01-22 18:43:54 +01:00
adbenitez fcd16d9e32 don't allow to delete or create new profile while sharing/forwarding 2026-01-22 17:50:16 +01:00
adbenitez 2a4bd2a001 add device messages on account switching 2026-01-22 17:31:32 +01:00
adbenitez eacd089c8f improve code in ConversationListActivity 2026-01-22 17:18:49 +01:00
adbenitez 9ed355efd1 don't save dcContext in MessageSelectorFragment and derivates 2026-01-21 20:59:39 +01:00
adbenitez d1bb25004d Merge branch 'adb/issue-4055' of https://github.com/deltachat/deltachat-android into adb/issue-4055 2026-01-21 20:21:28 +01:00
adbenitez 8d1b010d1b tweak SendRelayedMessageUtil 2026-01-21 20:21:10 +01:00
adb 8a9b76af3a Merge branch 'main' into adb/issue-4055 2026-01-21 20:13:24 +01:00
adb 4bbd9428e3 Merge pull request #4182 from deltachat/wch423/backpress-migration
Migrate deprecated `onBackPressed` calls
2026-01-21 20:05:14 +01:00
adb 83646003b6 Merge branch 'main' into adb/issue-4055 2026-01-21 19:45:10 +01:00
wch423 947887f335 Migrate deprecated onBackPressed calls 2026-01-21 18:59:56 +01:00
wchen342 69631cd857 Merge pull request #4181 from deltachat/adb/improve-InstantOnboardingActivity
avoid account rollback in InstantOnboardingActivity
2026-01-21 10:30:01 -05:00
adbenitez 0722426425 allow to forward messages to different account 2026-01-21 00:22:43 +01:00
adbenitez 98d54bbe6a prevent returning to old chat after switching account 2026-01-21 00:20:02 +01:00
adbenitez c1dc0cf127 ConversationActivity: use currently selected account
instead of storing dcContext once on creation, the selected account
might change
2026-01-21 00:14:41 +01:00
adbenitez 44a1ce42f0 avoid account rollback in InstantOnboardingActivity 2026-01-20 20:01:40 +01:00
adbenitez a0c6cef0fa add menu item to switch account 2026-01-20 19:44:32 +01:00
adbenitez f96e89956c account switcher: make switching accounts smoother 2026-01-20 16:31:02 +01:00
wchen342 ce9ded9d8b Merge pull request #4178 from deltachat/adb/issue-4174
Properly update menu and other actionMode state in ContactSelectionListFragment
2026-01-20 10:10:45 -05:00
adb cb2d9f16ac Merge branch 'main' into adb/issue-4174 2026-01-20 15:47:44 +01:00
wchen342 c2a13ae9dd Merge pull request #4179 from deltachat/adb/issue-4175
avoid empty profiles after using "add as second device" from welcome screen
2026-01-20 09:35:51 -05:00
adbenitez f8c2403e61 update changelog 2026-01-19 22:26:35 +01:00
adbenitez 616b495426 only create a new account if the selected one is already configured 2026-01-19 22:13:47 +01:00
adbenitez a22baa7fc3 update changelog 2026-01-19 19:29:12 +01:00
adbenitez 0b9bb9ff76 fix: properly update menu and other actionMode state in ContactSelectionListFragment 2026-01-19 19:18:41 +01:00
adb ef96192d8b Merge pull request #4173 from deltachat/wch423/fix-resume-wrong-activity
Do not launch WelcomeActivity as singleTask
2026-01-19 18:32:00 +01:00
B. Petersen 13c34d9480 make clear, the blockage comes from user action 2026-01-19 17:47:48 +01:00
adb 610f4cebc2 Merge pull request #4171 from deltachat/wch423/add-hint-empty-group-search
Show hint during Contact search if results are empty
2026-01-19 17:45:18 +01:00
adbenitez d4d15eee7c avoid showing "no results for null" if search term is empty 2026-01-19 17:39:26 +01:00
wch423 ee3886285b Show "No results found for" during Contact search if results are empty 2026-01-19 15:46:00 +01:00
wchen342 a32c20473f Merge pull request #4172 from deltachat/wch423/blocked-contact-profile-indicator
Add indication for blocked contacts in user profile
2026-01-19 08:19:25 -05:00
wch423 db956d93cf Do not launch WelcomeActivity as singleTask 2026-01-16 19:50:29 +01:00
wch423 6a5a75131e Add indication for blocked contacts in user profile 2026-01-16 17:44:34 +01:00
wchen342 a676a47ed4 Merge pull request #4170 from deltachat/adb/issue-3913
refresh chatlist when going back from chat
2026-01-16 13:51:04 +01:00
adbenitez 2067122d2c update changelog 2026-01-15 23:41:41 +01:00
adbenitez 8a0fe892f4 refresh chatlist when going back from chat 2026-01-15 23:33:57 +01:00
adb 29a6f4eb31 Merge pull request #4167 from deltachat/wch423/mark-external-links
Mark external links with a special character
2026-01-15 19:39:51 +01:00
adb f610592bff Merge branch 'main' into wch423/mark-external-links 2026-01-15 19:20:37 +01:00
adb 898008e2a1 Merge pull request #4168 from deltachat/wch423/larger-qr-code
Use new generation method so the QR code is larger
2026-01-15 19:20:01 +01:00
adb 9eaa3ca182 Merge branch 'main' into wch423/larger-qr-code 2026-01-15 18:59:13 +01:00
adb c98818e5cf Merge pull request #4166 from deltachat/wch423/notification-permission-second-device
Ask for Notification Permission when adding second device
2026-01-15 18:57:49 +01:00
wch423 7643ecd90a Use new generation method so the QR code is larger 2026-01-15 18:25:56 +01:00
wch423 e4993bd302 Add CHANGELOG 2026-01-15 16:58:52 +01:00
wch423 32ee198128 Add util methods to handle RTL/LTR text concatenations;
Add markers to external links
2026-01-15 16:56:29 +01:00
wch423 ab0d33b3c0 Ask for Notification Permission when adding second device 2026-01-15 14:07:58 +01:00
adb 2c8b781817 Merge pull request #4165 from deltachat/wch423/fix-qr-scanner-no-error-dialog
Fix dialogs not showing when pasted QR codes are not valid
2026-01-14 21:31:59 +01:00
wch423 e59655c456 Fix dialogs not showing when pasted QR codes are not valid 2026-01-14 21:21:17 +01:00
adb 2ce7e5a3c7 Merge pull request #4164 from deltachat/wch423/remove-profile-email
Remove email address from profile
2026-01-14 16:28:25 +01:00
wch423 79c7419b71 Update CHANGELOG.md 2026-01-14 16:16:55 +01:00
wch423 2efaf1df93 Remove email address from profile 2026-01-14 15:59:24 +01:00
adb 814ac7d976 Merge pull request #4162 from deltachat/adb/remove-from-welcome-in-CreateProfileActivity
remove FROM_WELCOME in CreateProfileActivity
2026-01-13 20:40:18 +01:00
adbenitez b0e5c1c634 remove FROM_WELCOME in CreateProfileActivity 2026-01-13 20:23:41 +01:00
B. Petersen bae998f811 truncate file names in the middle
that way, the end is always visible,
which contains important information more often than the middle.

this is common knowledge since the 90's or so
however, as quite some previously stable ux patterns, lost on the way.
(cmp. Scott Jensen, https://www.youtube.com/watch?v=1fZTOjd_bOQ )
2026-01-08 17:54:50 +01:00
adbenitez 1b0d3f8583 Merge remote-tracking branch 'upstream/main' 2026-01-08 17:42:54 +01:00
adb d81cb238df Merge pull request #4155 from deltachat/update-core-2026-01-08
Update core to 2.36.0
2026-01-08 17:26:46 +01:00
adbenitez 220ae351ee update CHANGELOG 2026-01-08 17:25:52 +01:00
adbenitez 4b09158535 update deltachat-core-rust to 'chore(release): prepare for 2.36.0' of 'v2.36.0' 2026-01-08 17:18:26 +01:00
adb e3c423cdd4 Merge pull request #4154 from deltachat/prep-2.35.0
prepare 2.35.0 release
2026-01-08 16:18:29 +01:00
adbenitez 7840f5c577 prepare 2.35.0 release 2026-01-08 16:11:00 +01:00
adb 87091c4214 Merge pull request #4153 from deltachat/adb/update-translations-2026-01-08
update translations
2026-01-08 16:09:27 +01:00
adbenitez 4996ca9d93 update translations 2026-01-08 16:02:35 +01:00
adb 9b8511b7f2 Merge pull request #4151 from deltachat/adb/issue-4133
avoid crash in FetchForegroundService.onCreate()
2026-01-08 15:50:01 +01:00
adbenitez a66fc7bf10 tweak fix 2026-01-07 18:19:44 +01:00
adbenitez 75cad1ab9c update changelog 2026-01-07 17:32:46 +01:00
adb be974b3fc8 Merge branch 'main' into adb/issue-4133 2026-01-07 17:22:07 +01:00
adbenitez 777ef609ff avoid crash in FetchForegroundService.onCreate() 2026-01-07 17:13:36 +01:00
adbenitez 224964db95 fix TAG in FetchForegroundService 2026-01-07 16:08:51 +01:00
B. Petersen 5bfc91de1b remove unused strings, add new deprecated strings 2026-01-07 15:57:02 +01:00
B. Petersen b9d1aa4338 clarify position of "Add Second Device" settings
clarify, that the "Add Second Device" settings are within Delta Chat,
not within system or app settings.

we got reports of ppl searching within system settings,
esp. on iOS, some apps have additional settings there,
so it is not so far fetched.

but also for other OS, the hint to start Delta Chat is useful
and not only noise.
2026-01-05 13:29:27 +01:00
B. Petersen e296dad260 update translations, add Kabyl (Taqbaylit) language 2026-01-05 13:26:05 +01:00
adb 4e372511fb Merge pull request #4145 from deltachat/adb/issue-4143
use DC_EVENT_TRANSPORTS_MODIFIED
2026-01-03 16:24:43 +01:00
adbenitez e0a71d0fff use DC_EVENT_TRANSPORTS_MODIFIED to sync changes from remote devices 2026-01-03 16:13:32 +01:00
adb 5bcdd4cf16 Merge pull request #4144 from deltachat/update-core-and-stuff-2026-01-02
Update core to 2.35.0
2026-01-02 14:49:26 +01:00
adbenitez 68b0b365da update translations 2026-01-02 14:42:18 +01:00
adbenitez 227046a739 update changelog 2026-01-02 14:40:03 +01:00
adbenitez f9127341e7 update deltachat-core-rust to 'chore(release): prepare for 2.35.0' of 'v2.35.0' 2026-01-02 14:38:16 +01:00
adb 184da9c20e Merge pull request #4142 from deltachat/r10s/remove-email-from-account-switcher
remove email from account switcher
2026-01-02 13:47:55 +01:00
adb 96b5cabeb6 Merge branch 'main' into r10s/remove-email-from-account-switcher 2026-01-02 13:45:27 +01:00
adb 4a8706b9e3 Merge pull request #4139 from deltachat/adb/issue-4138
avoid NPE accessing location manager, event center and notification center
2025-12-29 23:02:27 +01:00
adb 94a10afac2 Merge pull request #4134 from deltachat/adb/issue-4124
Harden security around relays and profile management
2025-12-29 23:01:43 +01:00
B. Petersen a0660faf07 update CHANGELOG 2025-12-24 13:42:36 +01:00
B. Petersen 26170fc147 no showing email in account switcher
even if that is done for non-chatmail only,
it raises false expectations for other profiles,
and here it is easy to avoid - if that is really an important information for the user,
they can add it to the label.

also, this synchronizes UI which what is done on desktop/iOS
2025-12-24 13:40:18 +01:00
adbenitez 8d6147761b add comment 2025-12-23 20:11:03 +01:00
adbenitez 9d6abfd979 avoid wrongly showing emoji icon while recording audio and event arrives 2025-12-23 20:08:57 +01:00
adbenitez 46f4324478 upload mappings to release 2025-12-22 20:03:44 +01:00
adbenitez bfeab57744 update screenshots 2025-12-22 19:36:26 +01:00
adbenitez 2e99926e82 Fix file_provider_paths.xml to support SD card 2025-12-22 19:21:22 +01:00
adbenitez c28148b843 avoid NPE accessing location manager, event center and notification center 2025-12-22 16:32:27 +01:00
B. Petersen b6b3fe12b6 fix: add members, not subscribers to emails 2025-12-21 16:44:20 +01:00
adbenitez 56c00a7c43 update changelog 2025-12-18 22:11:54 +01:00
adb 4803bcccdd Merge branch 'main' into adb/issue-4124 2025-12-18 22:09:44 +01:00
adb 92f17d5156 Merge pull request #4094 from deltachat/adb/remove-realtime-toggle
remove realtime preference toggle
2025-12-18 22:09:25 +01:00
adbenitez 5310c41694 protect profile deletion 2025-12-18 22:08:26 +01:00
adbenitez a54f3ed1a2 require authorization for relays management 2025-12-18 20:21:52 +01:00
adb 8ceb12370f Update src/main/java/org/thoughtcrime/securesms/ApplicationContext.java
Co-authored-by: Hocuri <hocuri@gmx.de>
2025-12-17 12:07:01 +01:00
adb 0a7839fb7d Update src/main/java/org/thoughtcrime/securesms/ApplicationContext.java
Co-authored-by: Hocuri <hocuri@gmx.de>
2025-12-17 12:06:50 +01:00
adb 6853d797f2 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-16 18:58:07 +01:00
adb 8d0f1a6602 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-16 17:25:40 +01:00
adb 7decf02fd3 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-16 14:49:57 +01:00
adb dbb9115024 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-15 12:56:15 +01:00
adbenitez 1b9c619739 update changelog 2025-12-15 12:53:16 +01:00
adb ccd8df85e4 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-15 12:51:27 +01:00
adb 1e31b479e8 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-09 10:04:37 +01:00
adb cf91468f65 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-08 15:50:44 +01:00
adb 6c31d8cf85 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-08 12:48:32 +01:00
adbenitez 4c8d27f4bb Merge branch 'adb/remove-realtime-toggle' of https://github.com/deltachat/deltachat-android into adb/remove-realtime-toggle 2025-12-07 17:33:11 +01:00
adbenitez 87c49dc680 update changelog 2025-12-07 17:29:07 +01:00
adb f0d5695729 Merge branch 'main' into adb/remove-realtime-toggle 2025-12-07 17:27:55 +01:00
adbenitez 0289f47adc remove realtime preference toggle 2025-12-07 17:18:39 +01:00
807 changed files with 34858 additions and 27613 deletions
+148 -9
View File
@@ -8,7 +8,7 @@ ArcaneChat is a Delta Chat Android client built on top of the official Delta Cha
- **Language:** Java (Java 8 compatibility)
- **Build System:** Gradle with Android Gradle Plugin 8.11.1
- **Min SDK:** 21 (Android 5.0)
- **Target SDK:** 35 (Android 15)
- **Target SDK:** 36 (Android 16)
- **NDK Version:** 27.0.12077973
- **Native Components:** Rust (deltachat-core-rust submodule)
- **UI Framework:** Android SDK, Material Design Components
@@ -17,13 +17,23 @@ ArcaneChat is a Delta Chat Android client built on top of the official Delta Cha
## Repository Structure
- `src/main/` - Main application source code
- `src/main/java/org/thoughtcrime/securesms/` - Main UI components
- `src/main/java/com/b44t/messenger/` - Delta Chat core integration
- `src/main/java/chat/delta/rpc/` - JSON-RPC bindings (generated, don't edit manually)
- `src/main/res/` - Android resources (layouts, strings, drawables)
- `src/androidTest/` - Instrumented tests (UI tests, benchmarks)
- `src/androidTest/java/com/b44t/messenger/uitests/` - UI tests
- `src/androidTest/java/com/b44t/messenger/uibenchmarks/` - Performance benchmarks
- `src/gplay/` - Google Play flavor-specific code
- `src/foss/` - F-Droid/FOSS flavor-specific code
- `jni/deltachat-core-rust/` - Native Rust core library (submodule)
- `jni/deltachat-core-rust/` - Native Rust core library (submodule, **don't edit directly**)
- `scripts/` - Build and helper scripts
- `scripts/ndk-make.sh` - Build native libraries
- `scripts/install-toolchains.sh` - Install Rust cross-compilation toolchains
- `scripts/generate-rpc-bindings.sh` - Generate JSON-RPC bindings
- `docs/` - Documentation
- `fastlane/` - App store metadata and screenshots
- `.github/workflows/` - CI/CD workflows (GitHub Actions)
## Build Instructions
@@ -33,17 +43,36 @@ ArcaneChat is a Delta Chat Android client built on top of the official Delta Cha
```bash
git submodule update --init --recursive
```
This MUST be done first before any build attempts.
2. **Build native libraries:**
2. **Set up environment variables:**
```bash
export ANDROID_NDK_ROOT=/path/to/ndk/27.0.12077973
export PATH=${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/:${ANDROID_NDK_ROOT}
```
Note: Path format varies by OS (linux-x86_64, darwin-x86_64, etc.)
3. **Install Rust toolchains:**
```bash
scripts/install-toolchains.sh
```
Required for building the native Rust components.
4. **Build native libraries:**
```bash
scripts/ndk-make.sh
```
Note: First run may take significant time as it builds for all architectures (armeabi-v7a, arm64-v8a, x86, x86_64)
**IMPORTANT:** First run takes 30-60 minutes as it builds for all architectures (armeabi-v7a, arm64-v8a, x86, x86_64).
For faster development builds, build for a single architecture:
```bash
scripts/ndk-make.sh armeabi-v7a
```
3. **Build APK:**
5. **Build APK:**
```bash
./gradlew assembleDebug
```
Build time: ~2-5 minutes after native libraries are built.
### Build Flavors
@@ -55,6 +84,24 @@ ArcaneChat is a Delta Chat Android client built on top of the official Delta Cha
- Debug APKs: `build/outputs/apk/gplay/debug/` and `build/outputs/apk/fat/debug/`
- Release APKs require signing configuration in `~/.gradle/gradle.properties`
### Common Build Issues
1. **Missing NDK or incorrect version:**
- Error: `ANDROID_NDK_ROOT not set` or native library missing
- Solution: Install NDK 27.0.12077973 and set ANDROID_NDK_ROOT environment variable
2. **Submodules not initialized:**
- Error: Missing deltachat-core-rust files
- Solution: Run `git submodule update --init --recursive`
3. **Gradle wrapper validation:**
- Always validate gradle wrapper before building: `./gradlew wrapper --gradle-version=current`
- Wrapper is validated in CI via `gradle/actions/wrapper-validation@v4`
4. **Clean build issues:**
- If build fails, try: `./gradlew clean && scripts/ndk-make.sh && ./gradlew assembleDebug`
- Remove `build/` directory if clean doesn't work
## Testing
### Running Unit Tests
@@ -62,16 +109,19 @@ ArcaneChat is a Delta Chat Android client built on top of the official Delta Cha
```bash
./gradlew test
```
Expected duration: 1-3 minutes
### Running Instrumented Tests
1. **Disable animations** on your device/emulator:
- Developer Options → Set "Window animation scale", "Transition animation scale", and "Animator duration scale" to 0x
- **CRITICAL:** Tests will fail if animations are enabled
2. **Run tests:**
```bash
./gradlew connectedAndroidTest
```
Expected duration: 10-30 minutes depending on device/emulator
### Online Tests
@@ -129,6 +179,14 @@ TEST_MAIL_PW=yourpassword
- Java bindings are in `src/main/java/com/b44t/messenger/Dc*.java`
- JSON-RPC bindings in `chat.delta.rpc.*` package (generated via dcrpcgen)
### Generating JSON-RPC Bindings
To regenerate JSON-RPC bindings after core changes:
```bash
./scripts/generate-rpc-bindings.sh
```
**Note:** Requires Rust tooling and [dcrpcgen tool](https://github.com/chatmail/dcrpcgen) installed
### Working with Translations
- Translations managed via Transifex (not in repository)
@@ -142,6 +200,43 @@ Decode crash symbols:
$ANDROID_NDK_ROOT/ndk-stack --sym obj/local/armeabi-v7a --dump crash.txt > decoded.txt
```
## Validation and Quality Checks
### Pre-commit Checks
Before committing changes, always run:
1. **Gradle wrapper validation:**
```bash
./gradlew wrapper --gradle-version=current
```
2. **Build verification:**
```bash
./gradlew assembleDebug
```
3. **Unit tests:**
```bash
./gradlew test
```
4. **Code style:** Match existing code style in modified files (no automatic formatter configured)
### When to Rebuild Native Libraries
Rebuild native libraries (`scripts/ndk-make.sh`) when:
- Updating deltachat-core-rust submodule
- Modifying anything in `jni/` directory
- Changing NDK version
- After `git clean -fdx` or fresh clone
**DO NOT** rebuild native libraries for:
- Pure Java/Kotlin code changes
- Resource file changes
- Gradle configuration changes (unless changing native library linking)
- Documentation updates
## WebXDC Support
ArcaneChat has extended WebXDC support:
@@ -152,12 +247,24 @@ ArcaneChat has extended WebXDC support:
## Important Files
- `build.gradle` - Main build configuration
- `build.gradle` - Main build configuration (Android Gradle Plugin 8.11.1, Java 8 compatibility)
- `CONTRIBUTING.md` - Contribution guidelines
- `BUILDING.md` - Detailed build setup
- `BUILDING.md` - Detailed build setup instructions
- `RELEASE.md` - Release process
- `proguard-rules.pro` - ProGuard configuration
- `google-services.json` - Firebase configuration (gplay flavor)
- `proguard-rules.pro` - ProGuard configuration (enabled for both debug and release)
- `google-services.json` - Firebase configuration (gplay flavor only)
- `settings.gradle` - Gradle settings
- `.github/workflows/` - CI/CD configuration
## Dependencies and Constraints
- **Java Version:** Java 8 compatibility (do not use Java 9+ features)
- **Gradle:** Use wrapper (`./gradlew`) to ensure correct Gradle version
- **NDK:** Must use version 27.0.12077973 (specified in build.gradle)
- **Min SDK:** 21 (Android 5.0) - code must be compatible
- **Target SDK:** 36 (Android 16) - test on this API level when possible
- **ProGuard:** Always enabled - ensure ProGuard rules are correct for new dependencies
- **Multi-dex:** Enabled - app exceeds 65k method limit
## Package Structure
@@ -173,3 +280,35 @@ ArcaneChat has extended WebXDC support:
- Native library must be rebuilt after core changes
- ProGuard is enabled in both debug and release builds
- Multi-dex is enabled due to app size
## CI/CD Workflows
### Preview APK Workflow (.github/workflows/preview-apk.yml)
Runs on every pull request to build and upload a preview APK:
1. **Setup steps:**
- Checks out repository with submodules
- Validates Fastlane metadata
- Sets up Rust cache (working-directory: jni/deltachat-core-rust)
- Sets up Java 17 (Temurin distribution)
- Sets up Android SDK
- Caches Gradle dependencies
- Sets up NDK r27
2. **Build process:**
```bash
scripts/install-toolchains.sh && scripts/ndk-make.sh armeabi-v7a
./gradlew --no-daemon -PABI_FILTER=armeabi-v7a assembleFossDebug
```
Note: Builds only armeabi-v7a for faster CI builds
3. **Output:** Uploads APK artifact to GitHub Actions
### Important CI Considerations
- Always validate Gradle wrapper before committing changes
- Fastlane metadata must be valid (validated in CI)
- Use `--no-daemon` flag for Gradle in CI environments
- CI builds use FOSS flavor to avoid Google Services dependencies
- Expected CI build time: 15-25 minutes for full workflow
+2 -2
View File
@@ -45,10 +45,10 @@ jobs:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
export PATH="${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/"
scripts/install-toolchains.sh && scripts/ndk-make.sh armeabi-v7a
scripts/install-toolchains.sh && scripts/ndk-make.sh arm64-v8a
- name: Build APK
run: ./gradlew --no-daemon -PABI_FILTER=armeabi-v7a assembleFossDebug
run: ./gradlew --no-daemon -PABI_FILTER=arm64-v8a assembleFossDebug
- name: Upload APK
uses: actions/upload-artifact@v4
+5 -1
View File
@@ -59,6 +59,8 @@ jobs:
rm build/outputs/apk/foss/release/*universal*
./gradlew assembleGplayRelease
mv build/outputs/apk/gplay/release/*universal* build/outputs/apk/foss/release/ArcaneChat-gplay.apk
mv build/outputs/mapping/fossRelease/mapping.txt build/outputs/mapping/fossRelease/mapping-foss.txt
mv build/outputs/mapping/gplayRelease/mapping.txt build/outputs/mapping/fossRelease/mapping-gplay.txt
- name: Release on GitHub
uses: softprops/action-gh-release@v1
@@ -67,7 +69,9 @@ jobs:
body: '[<img src="store/get-it-on-gplay.png" alt="Get it on Google Play" height="48">](https://play.google.com/store/apps/details?id=com.github.arcanechat) [<img src="store/get-it-on-fdroid.png" alt="Get it on F-Droid" height="48">](https://f-droid.org/packages/chat.delta.lite) [<img src="store/get-it-on-github.png" alt="Get it on GitHub" height="48">](https://github.com/ArcaneChat/android/releases/latest/download/ArcaneChat-gplay.apk)'
prerelease: ${{ contains(github.event.ref, '-beta') }}
fail_on_unmatched_files: true
files: build/outputs/apk/foss/release/*.apk
files: |
build/outputs/apk/foss/release/*.apk
build/outputs/mapping/fossRelease/mapping-*.txt
- name: Release on ZapStore
run: |
+53
View File
@@ -1,5 +1,58 @@
# Delta Chat Android Changelog
## Unreleased
* Allow to set chat description
* Unified date display in call bubbles
* Explain at "Settings / Chats / Outgoing Media Quality" how to send original quality
* Add a basic sticker picker
* Leave groups and channels before deletion
* Fix: keep original sent timestamp for resent messages
* Fix: make clicking on broadcast member-added messages work always
* Fix: remove notification when a message is deleted by sender
* Update to core 2.44.0
## v2.43.0
2026-02
* Improve switch speed when changing profiles
* Allow to switch profile when sharing or forwarding
* Display message views count for channel owners
* Don't notify notification-to-all from in-chat apps if the chat is muted
* Allow to see inbox quota for all relays in connectivity screen
* Truncate file names in the middle, not at the end; important information are more often at the end
* Remove email address from user profile
* Mark external links with " ↗" to make them clear
* Make QR code larger on "Add Second Device" screen
* Add indication for blocked contacts in user profile
* Allow to start calls with video disabled
* Show hint for empty contact search results
* Add background playing for voice messages and other audio files
* Allow scanning Invitation Code when creating a new profile
* Add context menu in long-pressing relays items instead of showing buttons
* Enhanced video player UI
* Fix: Show dialog if pasted QR codes are invalid
* Fix: Refresh chat list when returning from conversation if selected profile changed
* Fix: Update menu when using "select all" in contact selection
* Fix: Avoid empty profiles after using "add as second device" from welcome screen
* Fix: Remove from group deselected members in the contact selection list
* Fix multi-device seen messages synchronization when using multiple relays
* Fix mailto handling
* Fix layout problems inside in-chat apps
* Fix real-time for in-chat apps that need it
* Avoid crash when the app is minimized with profile switcher or reactions dialogs open
* Remove "trash icon" option from contact selection list when adding members to group
* Update to core 2.43.0
## v2.35.0
2026-01
* Protect profile deletion and relays management with system lock/pin
* Fix: Remove address from profile switcher
* Fix: Avoid crash if the system doesn't allow to start foreground service
* Remove deprecated "real-time apps" switch
* Update to core 2.35.0
## v2.34.0
2025-12
+8 -3
View File
@@ -33,8 +33,8 @@ android {
useLibrary 'org.apache.http.legacy'
defaultConfig {
versionCode 30000735
versionName "2.34.0"
versionCode 30000737
versionName "2.43.0"
applicationId "chat.delta.lite"
multiDexEnabled true
@@ -211,6 +211,8 @@ dependencies {
implementation "io.noties.markwon:inline-parser:$markwon_version"
implementation 'com.airbnb.android:lottie:4.2.2' // Lottie animations support.
def media3_version = "1.8.0" // 1.9.0 need minSdkVersion 23
implementation 'androidx.concurrent:concurrent-futures:1.3.0'
implementation 'androidx.sharetarget:sharetarget:1.2.0'
implementation 'androidx.webkit:webkit:1.14.0'
@@ -231,8 +233,11 @@ dependencies {
implementation 'androidx.work:work-runtime:2.9.1'
implementation 'androidx.emoji2:emoji2-emojipicker:1.5.0'
implementation 'com.google.guava:guava:31.1-android'
implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1' // plays video and audio
implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1' // FIXME: exoplayer dependencies kept for Video, but we shall migrate them at some point
implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1'
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-session:$media3_version"
implementation "androidx.media3:media3-ui:$media3_version"
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'com.google.zxing:core:3.3.0' // fixed version to support SDK<24
implementation ('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false } // QR Code scanner
Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 KiB

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 KiB

After

Width:  |  Height:  |  Size: 446 KiB

+39 -3
View File
@@ -153,6 +153,42 @@ static uint32_t* jintArray2uint32Pointer(JNIEnv* env, jintArray ja, int* ret_icn
}
/************************************************************
* DcEventChannel
************************************************************/
static dc_event_channel_t* get_dc_event_channel(JNIEnv *env, jobject obj)
{
static jfieldID fid = 0;
if (fid==0) {
jclass cls = (*env)->GetObjectClass(env, obj);
fid = (*env)->GetFieldID(env, cls, "eventChannelCPtr", "J" /*Signature, J=long*/);
}
if (fid) {
return (dc_event_channel_t*)(*env)->GetLongField(env, obj, fid);
}
return NULL;
}
JNIEXPORT jlong Java_com_b44t_messenger_DcEventChannel_createEventChannelCPtr(JNIEnv *env, jobject obj)
{
return (jlong)dc_event_channel_new();
}
JNIEXPORT void Java_com_b44t_messenger_DcEventChannel_unrefEventChannelCPtr(JNIEnv *env, jobject obj)
{
dc_event_channel_unref(get_dc_event_channel(env, obj));
}
JNIEXPORT jlong Java_com_b44t_messenger_DcEventChannel_getEventEmitterCPtr(JNIEnv *env, jobject obj)
{
return (jlong)dc_event_channel_get_event_emitter(get_dc_event_channel(env, obj));
}
/*******************************************************************************
* DcAccounts
******************************************************************************/
@@ -172,11 +208,11 @@ static dc_accounts_t* get_dc_accounts(JNIEnv *env, jobject obj)
}
JNIEXPORT jlong Java_com_b44t_messenger_DcAccounts_createAccountsCPtr(JNIEnv *env, jobject obj, jstring dir)
JNIEXPORT jlong Java_com_b44t_messenger_DcAccounts_createAccountsCPtr(JNIEnv *env, jobject obj, jstring dir, jobject chanObj)
{
CHAR_REF(dir);
int writable = 1;
jlong accountsCPtr = (jlong)dc_accounts_new(dirPtr, writable);
jlong accountsCPtr = (jlong)dc_accounts_new_with_event_channel(dirPtr, writable, get_dc_event_channel(env, chanObj));
CHAR_UNREF(dir);
return accountsCPtr;
}
@@ -1957,7 +1993,7 @@ JNIEXPORT jstring Java_com_b44t_messenger_DcBackupProvider_getQr(JNIEnv *env, jo
JNIEXPORT jstring Java_com_b44t_messenger_DcBackupProvider_getQrSvg(JNIEnv *env, jobject obj)
{
char* temp = dc_backup_provider_get_qr_svg(get_dc_backup_provider(env, obj));
char* temp = dc_create_qr_svg(dc_backup_provider_get_qr(get_dc_backup_provider(env, obj)));
jstring ret = JSTRING_NEW(temp);
dc_str_unref(temp);
return ret;
@@ -11,7 +11,6 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.test.espresso.NoMatchingViewException;
import androidx.test.espresso.UiController;
@@ -19,7 +18,6 @@ import androidx.test.espresso.ViewAction;
import androidx.test.espresso.ViewInteraction;
import androidx.test.espresso.util.TreeIterables;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import org.hamcrest.Matcher;
import org.thoughtcrime.securesms.ConversationListActivity;
import org.thoughtcrime.securesms.R;
@@ -60,10 +58,12 @@ public class TestUtils {
}
@NonNull
public static ActivityScenarioRule<ConversationListActivity> getOfflineActivityRule(boolean useExistingChats) {
public static ActivityScenarioRule<ConversationListActivity> getOfflineActivityRule(
boolean useExistingChats) {
Intent intent =
Intent.makeMainActivity(
new ComponentName(getInstrumentation().getTargetContext(), ConversationListActivity.class));
Intent.makeMainActivity(
new ComponentName(
getInstrumentation().getTargetContext(), ConversationListActivity.class));
if (!useExistingChats) {
createOfflineAccount();
}
@@ -72,18 +72,22 @@ public class TestUtils {
}
@NonNull
public static <T extends Activity> ActivityScenarioRule<T> getOnlineActivityRule(Class<T> activityClass) {
public static <T extends Activity> ActivityScenarioRule<T> getOnlineActivityRule(
Class<T> activityClass) {
Context context = getInstrumentation().getTargetContext();
AccountManager.getInstance().beginAccountCreation(context);
prepare();
return new ActivityScenarioRule<>(new Intent(getInstrumentation().getTargetContext(), activityClass));
return new ActivityScenarioRule<>(
new Intent(getInstrumentation().getTargetContext(), activityClass));
}
private static void prepare() {
Prefs.setBooleanPreference(getInstrumentation().getTargetContext(), Prefs.DOZE_ASKED_DIRECTLY, true);
Prefs.setBooleanPreference(
getInstrumentation().getTargetContext(), Prefs.DOZE_ASKED_DIRECTLY, true);
if (!AccessibilityUtil.areAnimationsDisabled(getInstrumentation().getTargetContext())) {
throw new RuntimeException("To run the tests, disable animations at Developer options' " +
"-> 'Window/Transition/Animator animation scale' -> Set all 3 to 'off'");
throw new RuntimeException(
"To run the tests, disable animations at Developer options' "
+ "-> 'Window/Transition/Animator animation scale' -> Set all 3 to 'off'");
}
}
@@ -116,26 +120,22 @@ public class TestUtils {
}
throw new NoMatchingViewException.Builder()
.withRootView(view)
.withViewMatcher(matcher)
.build();
.withRootView(view)
.withViewMatcher(matcher)
.build();
}
};
}
/**
* Perform action of implicitly waiting for a certain view.
* This differs from EspressoExtensions.searchFor in that,
* upon failure to locate an element, it will fetch a new root view
* in which to traverse searching for our @param match
* Perform action of implicitly waiting for a certain view. This differs from
* EspressoExtensions.searchFor in that, upon failure to locate an element, it will fetch a new
* root view in which to traverse searching for our @param match
*
* @param viewMatcher ViewMatcher used to find our view
*/
public static ViewInteraction waitForView(
Matcher<View> viewMatcher,
int waitMillis,
int waitMillisPerTry
) {
Matcher<View> viewMatcher, int waitMillis, int waitMillisPerTry) {
// Derive the max tries
int maxTries = (int) (waitMillis / waitMillisPerTry);
@@ -164,12 +164,11 @@ public class TestUtils {
}
/**
* Normally, you would do
* onView(withId(R.id.send_button)).perform(click());
* to send the draft message. However, in order to change the send button to the attach button
* while there is no draft, the send button is made invisible and the attach button is made
* visible instead. This confuses the test framework.<br/><br/>
*
* Normally, you would do onView(withId(R.id.send_button)).perform(click()); to send the draft
* message. However, in order to change the send button to the attach button while there is no
* draft, the send button is made invisible and the attach button is made visible instead. This
* confuses the test framework.<br>
* <br>
* So, this is a workaround for pressing the send button.
*/
public static void pressSend() {
@@ -10,14 +10,11 @@ import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import android.util.Log;
import androidx.test.espresso.contrib.RecyclerViewActions;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import com.b44t.messenger.TestUtils;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Rule;
@@ -34,18 +31,19 @@ public class EnterChatsBenchmark {
// ==============================================================================================
// Set this to true if you already have at least 10 chats on your existing DeltaChat installation
// and want to traverse through them instead of 10 newly created chats
private final static boolean USE_EXISTING_CHATS = false;
private static final boolean USE_EXISTING_CHATS = false;
// ==============================================================================================
private final static int GO_THROUGH_ALL_CHATS_N_TIMES = 8;
private static final int GO_THROUGH_ALL_CHATS_N_TIMES = 8;
// ==============================================================================================
// PLEASE BACKUP YOUR ACCOUNT BEFORE RUNNING THIS!
// ==============================================================================================
private final static String TAG = EnterChatsBenchmark.class.getSimpleName();
private static final String TAG = EnterChatsBenchmark.class.getSimpleName();
@Rule
public ActivityScenarioRule<ConversationListActivity> activityRule = TestUtils.getOfflineActivityRule(USE_EXISTING_CHATS);
public ActivityScenarioRule<ConversationListActivity> activityRule =
TestUtils.getOfflineActivityRule(USE_EXISTING_CHATS);
@Test
public void createAndEnter10FilledChats() {
@@ -55,7 +53,9 @@ public class EnterChatsBenchmark {
for (int i = 0; i < GO_THROUGH_ALL_CHATS_N_TIMES; i++) {
times[i] = "" + timeGoToNChats(10); // 10 group chats were created
}
Log.i(TAG, "MEASURED RESULTS (Benchmark) - Going thorough all 10 chats: " + String.join(",", times));
Log.i(
TAG,
"MEASURED RESULTS (Benchmark) - Going thorough all 10 chats: " + String.join(",", times));
}
@Test
@@ -66,13 +66,17 @@ public class EnterChatsBenchmark {
for (int i = 0; i < GO_THROUGH_ALL_CHATS_N_TIMES; i++) {
times[i] = "" + timeGoToNChats(1);
}
Log.i(TAG, "MEASURED RESULTS (Benchmark) - Entering and leaving 1 empty chat: " + String.join(",", times));
Log.i(
TAG,
"MEASURED RESULTS (Benchmark) - Entering and leaving 1 empty chat: "
+ String.join(",", times));
}
@Test
public void enterFilledChat() {
if (!USE_EXISTING_CHATS) {
createChatAndGoBack("Group #1", true, "Hello!", "Some links: https://testrun.org", "And a command: /help");
createChatAndGoBack(
"Group #1", true, "Hello!", "Some links: https://testrun.org", "And a command: /help");
}
String[] times = new String[50];
@@ -82,7 +86,18 @@ public class EnterChatsBenchmark {
long end = System.currentTimeMillis();
long diff = end - start;
pressBack();
Log.i(TAG, "Measured (Benchmark) " + (i+1) + "/" + times.length + ": Entering 1 filled chat took " + diff + "ms " + "(going back took " + (System.currentTimeMillis() - end) + "ms)");
Log.i(
TAG,
"Measured (Benchmark) "
+ (i + 1)
+ "/"
+ times.length
+ ": Entering 1 filled chat took "
+ diff
+ "ms "
+ "(going back took "
+ (System.currentTimeMillis() - end)
+ "ms)");
times[i] = "" + diff;
}
@@ -91,16 +106,37 @@ public class EnterChatsBenchmark {
private void create10Chats(boolean fillWithMsgs) {
if (!USE_EXISTING_CHATS) {
createChatAndGoBack("Group #1", fillWithMsgs, "Hello!", "Some links: https://testrun.org", "And a command: /help");
createChatAndGoBack("Group #2", fillWithMsgs, "example.org, alice@example.org", "aaaaaaa", "bbbbbb");
createChatAndGoBack("Group #3", fillWithMsgs, repeat("Some string ", 600), repeat("Another string", 200), "Hi!!!");
createChatAndGoBack(
"Group #1",
fillWithMsgs,
"Hello!",
"Some links: https://testrun.org",
"And a command: /help");
createChatAndGoBack(
"Group #2", fillWithMsgs, "example.org, alice@example.org", "aaaaaaa", "bbbbbb");
createChatAndGoBack(
"Group #3",
fillWithMsgs,
repeat("Some string ", 600),
repeat("Another string", 200),
"Hi!!!");
createChatAndGoBack("Group #4", fillWithMsgs, "xyzabc", "Hi!!!!", "Let's meet!");
createChatAndGoBack("Group #5", fillWithMsgs, repeat("aaaa", 40), "bbbbbbbbbbbbbbbbbb", "ccccccccccccccc");
createChatAndGoBack("Group #6", fillWithMsgs, "aaaaaaaaaaa", repeat("Hi! ", 1000), "bbbbbbbbbb");
createChatAndGoBack("Group #7", fillWithMsgs, repeat("abcdefg ", 500), repeat("xxxxx", 100), "yrrrrrrrrrrrrr");
createChatAndGoBack("Group #8", fillWithMsgs, "and a number: 037362/384756", "ccccc", "Nice!");
createChatAndGoBack("Group #9", fillWithMsgs, "ddddddddddddddddd", "zuuuuuuuuuuuuuuuu", "ccccc");
createChatAndGoBack("Group #10", fillWithMsgs, repeat("xxxxxxyyyyy", 100), repeat("String!!", 10), "abcd");
createChatAndGoBack(
"Group #5", fillWithMsgs, repeat("aaaa", 40), "bbbbbbbbbbbbbbbbbb", "ccccccccccccccc");
createChatAndGoBack(
"Group #6", fillWithMsgs, "aaaaaaaaaaa", repeat("Hi! ", 1000), "bbbbbbbbbb");
createChatAndGoBack(
"Group #7",
fillWithMsgs,
repeat("abcdefg ", 500),
repeat("xxxxx", 100),
"yrrrrrrrrrrrrr");
createChatAndGoBack(
"Group #8", fillWithMsgs, "and a number: 037362/384756", "ccccc", "Nice!");
createChatAndGoBack(
"Group #9", fillWithMsgs, "ddddddddddddddddd", "zuuuuuuuuuuuuuuuu", "ccccc");
createChatAndGoBack(
"Group #10", fillWithMsgs, repeat("xxxxxxyyyyy", 100), repeat("String!!", 10), "abcd");
}
}
@@ -130,10 +166,10 @@ public class EnterChatsBenchmark {
onView(withContentDescription(R.string.group_create_button)).perform(click());
if (fillWithMsgs) {
for (String t: texts) {
for (String t : texts) {
sendText(t);
}
for (String t: texts) {
for (String t : texts) {
sendText(t);
}
}
@@ -14,11 +14,10 @@ import androidx.test.espresso.contrib.RecyclerViewActions;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import com.b44t.messenger.DcContact;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.TestUtils;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -29,8 +28,6 @@ import org.thoughtcrime.securesms.ConversationListActivity;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.connect.DcHelper;
import java.util.concurrent.TimeUnit;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class ForwardingTest {
@@ -43,7 +40,8 @@ public class ForwardingTest {
}
@Rule
public final ActivityScenarioRule<ConversationListActivity> activityRule = TestUtils.getOfflineActivityRule(false);
public final ActivityScenarioRule<ConversationListActivity> activityRule =
TestUtils.getOfflineActivityRule(false);
@Before
public void createChats() {
@@ -51,10 +49,13 @@ public class ForwardingTest {
dcContext.createChatByContactId(DcContact.DC_CONTACT_ID_SELF);
// Disable bcc_self so that DC doesn't try to send messages to the server.
// If we didn't do this, messages would stay in DC_STATE_OUT_PENDING forever.
// The thing is, DC_STATE_OUT_PENDING show a rotating circle animation, and Espresso doesn't work
// The thing is, DC_STATE_OUT_PENDING show a rotating circle animation, and Espresso doesn't
// work
// with animations, and the tests would hang and never finish.
dcContext.setConfig("bcc_self", "0");
activityRule.getScenario().onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat( "group"));
activityRule
.getScenario()
.onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat("group"));
}
@After
@@ -68,7 +69,8 @@ public class ForwardingTest {
// The group is at position 0, self chat is at position 1, device talk is at position 2
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(2, click()));
onView(withId(R.id.title)).check(matches(withText(R.string.device_talk)));
onView(withId(android.R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, longClick()));
onView(withId(android.R.id.list))
.perform(RecyclerViewActions.actionOnItemAtPosition(0, longClick()));
onView(withId(R.id.menu_context_forward)).perform(click());
// Send it to self chat (which is sorted to the top because we're forwarding)
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));
@@ -77,11 +79,13 @@ public class ForwardingTest {
pressBack();
onView(withId(R.id.toolbar_title)).check(matches(withText(R.string.connectivity_not_connected)));
onView(withId(R.id.toolbar_title))
.check(matches(withText(R.string.connectivity_not_connected)));
// Self chat moved up because we sent a message there
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));
onView(withId(R.id.title)).check(matches(withText(R.string.saved_messages)));
onView(withId(android.R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, longClick()));
onView(withId(android.R.id.list))
.perform(RecyclerViewActions.actionOnItemAtPosition(0, longClick()));
onView(withId(R.id.menu_context_forward)).perform(click());
// Send it to the group
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(1, click()));
@@ -89,6 +93,7 @@ public class ForwardingTest {
onView(withId(R.id.title)).check(matches(withText("group")));
pressBack();
onView(withId(R.id.toolbar_title)).check(matches(withText(R.string.connectivity_not_connected)));
onView(withId(R.id.toolbar_title))
.check(matches(withText(R.string.connectivity_not_connected)));
}
}
@@ -14,15 +14,13 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import androidx.test.espresso.contrib.RecyclerViewActions;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.TestUtils;
import java.io.File;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -34,9 +32,6 @@ import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.ShareActivity;
import org.thoughtcrime.securesms.connect.DcHelper;
import java.io.File;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class SharingTest {
@@ -48,26 +43,34 @@ public class SharingTest {
private static int createdSingleChatId;
@Rule
public final ActivityScenarioRule<ConversationListActivity> activityRule = TestUtils.getOfflineActivityRule(false);
public final ActivityScenarioRule<ConversationListActivity> activityRule =
TestUtils.getOfflineActivityRule(false);
@Before
public void createGroup() {
activityRule.getScenario().onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat( "group"));
activityRule
.getScenario()
.onActivity(a -> createdGroupId = DcHelper.getContext(a).createGroupChat("group"));
}
@Before
public void createSingleChat() {
activityRule.getScenario().onActivity(a -> {
int contactId = DcHelper.getContext(a).createContact("", "abc@example.org");
createdSingleChatId = DcHelper.getContext(a).createChatByContactId(contactId);
});
activityRule
.getScenario()
.onActivity(
a -> {
int contactId = DcHelper.getContext(a).createContact("", "abc@example.org");
createdSingleChatId = DcHelper.getContext(a).createChatByContactId(contactId);
});
}
@Test
public void testNormalSharing() {
Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_TEXT, "Hello!");
i.setComponent(new ComponentName(getInstrumentation().getTargetContext().getApplicationContext(), ShareActivity.class));
i.setComponent(
new ComponentName(
getInstrumentation().getTargetContext().getApplicationContext(), ShareActivity.class));
activityRule.getScenario().onActivity(a -> a.startActivity(i));
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));
@@ -77,9 +80,9 @@ public class SharingTest {
}
/**
* Test direct sharing from a screenshot.
* Also, this is the regression test for https://github.com/deltachat/deltachat-android/issues/2040
* where network changes during sharing lead to a bug
* Test direct sharing from a screenshot. Also, this is the regression test for
* https://github.com/deltachat/deltachat-android/issues/2040 where network changes during sharing
* lead to a bug
*/
@Test
public void testShareFromScreenshot() {
@@ -92,20 +95,25 @@ public class SharingTest {
pngImage = file;
}
}
Uri uri = Uri.parse("content://" + BuildConfig.APPLICATION_ID + ".attachments/" + Uri.encode(pngImage));
Uri uri =
Uri.parse(
"content://" + BuildConfig.APPLICATION_ID + ".attachments/" + Uri.encode(pngImage));
DcHelper.sharedFiles.put(pngImage, "image/png");
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("image/png");
i.putExtra(Intent.EXTRA_SUBJECT, "Screenshot (Sep 27, 2021 00:00:00");
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
i.setFlags(
Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
| Intent.FLAG_ACTIVITY_FORWARD_RESULT
| Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP
| Intent.FLAG_RECEIVER_FOREGROUND
| Intent.FLAG_GRANT_READ_URI_PERMISSION);
i.putExtra(Intent.EXTRA_STREAM, uri);
i.putExtra(ShareActivity.EXTRA_CHAT_ID, createdGroupId);
i.setComponent(new ComponentName(getInstrumentation().getTargetContext().getApplicationContext(), ShareActivity.class));
i.setComponent(
new ComponentName(
getInstrumentation().getTargetContext().getApplicationContext(), ShareActivity.class));
activityRule.getScenario().onActivity(a -> a.startActivity(i));
TestUtils.waitForView(withId(R.id.send_button), 10000, 50);
@@ -121,16 +129,32 @@ public class SharingTest {
}
/**
* Tests https://github.com/deltachat/interface/blob/master/user-testing/mailto-links.md#mailto-links:
* Tests
* https://github.com/deltachat/interface/blob/master/user-testing/mailto-links.md#mailto-links:
*
* <ul dir="auto">
* <li><a href="mailto:abc@example.org">Just an email address</a> - should open a chat with <code>abc@example.org</code> (and maybe ask whether a chat should be created if it does not exist already)</li>
* <li><a href="mailto:abc@example.org?subject=testing%20mailto%20uris">email address with subject</a> - should open a chat with <code>abc@example.org</code> and fill <code>testing mailto uris</code>; as we created the chat in the previous step, it should not ask <code>Chat with …</code> but directly open the chat</li>
* <li><a href="mailto:abc@example.org?body=this%20is%20a%20test">email address with body</a> - should open a chat with <code>abc@example.org</code>, draft <code>this is a test</code></li>
* <li><a href="mailto:abc@example.org?subject=testing%20mailto%20uris&amp;body=this%20is%20a%20test">email address with subject and body</a> - should open a chat with <code>abc@example.org</code>, draft <code>testing mailto uris</code> &lt;newline&gt; <code>this is a test</code></li>
* <li><a href="mailto:%20info@example.org">HTML encoding</a> - should open a chat with <code>info@example.org</code></li>
* <li><a href="mailto:simplebot@example.org?body=!web%20https%3A%2F%2Fduckduckgo.com%2Flite%3Fq%3Dduck%2520it">more HTML encoding</a> - should open a chat with <code>simplebot@example.org</code>, draft <code>!web https://duckduckgo.com/lite?q=duck%20it</code></li>
* <li><a href="mailto:?subject=bla&amp;body=blub">no email, just subject&amp;body</a> - this should let you choose a chat and create a draft <code>bla</code> &lt;newline&gt; <code>blub</code> there</li>
* <li><a href="mailto:abc@example.org">Just an email address</a> - should open a chat with
* <code>abc@example.org</code> (and maybe ask whether a chat should be created if it does
* not exist already)
* <li><a href="mailto:abc@example.org?subject=testing%20mailto%20uris">email address with
* subject</a> - should open a chat with <code>abc@example.org</code> and fill <code>
* testing mailto uris</code>; as we created the chat in the previous step, it should not
* ask <code>Chat with …</code> but directly open the chat
* <li><a href="mailto:abc@example.org?body=this%20is%20a%20test">email address with body</a> -
* should open a chat with <code>abc@example.org</code>, draft <code>this is a test</code>
* <li><a
* href="mailto:abc@example.org?subject=testing%20mailto%20uris&amp;body=this%20is%20a%20test">email
* address with subject and body</a> - should open a chat with <code>abc@example.org</code>,
* draft <code>testing mailto uris</code> &lt;newline&gt; <code>this is a test</code>
* <li><a href="mailto:%20info@example.org">HTML encoding</a> - should open a chat with <code>
* info@example.org</code>
* <li><a
* href="mailto:simplebot@example.org?body=!web%20https%3A%2F%2Fduckduckgo.com%2Flite%3Fq%3Dduck%2520it">more
* HTML encoding</a> - should open a chat with <code>simplebot@example.org</code>, draft
* <code>!web https://duckduckgo.com/lite?q=duck%20it</code>
* <li><a href="mailto:?subject=bla&amp;body=blub">no email, just subject&amp;body</a> - this
* should let you choose a chat and create a draft <code>bla</code> &lt;newline&gt; <code>
* blub</code> there
* </ul>
*/
@Test
@@ -140,7 +164,8 @@ public class SharingTest {
openLink("mailto:abc@example.org?subject=testing%20mailto%20uris");
onView(withId(R.id.subtitle)).check(matches(withText("abc@example.org")));
onView(withHint(R.string.chat_input_placeholder)).check(matches(withText("testing mailto uris")));
onView(withHint(R.string.chat_input_placeholder))
.check(matches(withText("testing mailto uris")));
openLink("mailto:abc@example.org?body=this%20is%20a%20test");
onView(withId(R.id.subtitle)).check(matches(withText("abc@example.org")));
@@ -148,17 +173,22 @@ public class SharingTest {
openLink("mailto:abc@example.org?subject=testing%20mailto%20uris&body=this%20is%20a%20test");
onView(withId(R.id.subtitle)).check(matches(withText("abc@example.org")));
onView(withHint(R.string.chat_input_placeholder)).check(matches(withText("testing mailto uris\nthis is a test")));
onView(withHint(R.string.chat_input_placeholder))
.check(matches(withText("testing mailto uris\nthis is a test")));
openLink("mailto:%20abc@example.org");
onView(withId(R.id.subtitle)).check(matches(withText("abc@example.org")));
openLink("mailto:abc@example.org?body=!web%20https%3A%2F%2Fduckduckgo.com%2Flite%3Fq%3Dduck%2520it");
openLink(
"mailto:abc@example.org?body=!web%20https%3A%2F%2Fduckduckgo.com%2Flite%3Fq%3Dduck%2520it");
onView(withId(R.id.subtitle)).check(matches(withText("abc@example.org")));
onView(withHint(R.string.chat_input_placeholder)).check(matches(withText("!web https://duckduckgo.com/lite?q=duck%20it")));
onView(withHint(R.string.chat_input_placeholder))
.check(matches(withText("!web https://duckduckgo.com/lite?q=duck%20it")));
openLink("mailto:?subject=bla&body=blub");
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
onView(withId(R.id.list))
.perform(
RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
onView(withId(R.id.subtitle)).check(matches(withText("abc@example.org")));
onView(withHint(R.string.chat_input_placeholder)).check(matches(withText("bla\nblub")));
}
@@ -170,49 +200,61 @@ public class SharingTest {
}
/**
*
*
* <ul dir="auto">
* <li>Open Saved Messages chat (could be any other chat too)</li>
* <li>Go to another app and share some text to DC</li>
* <li>In DC select Saved Messages. Edit the shared text if you like. <em>Don't</em> hit the Send button.</li>
* <li>Leave DC</li>
* <li>Open DC again from the "Recent apps"</li>
* <li>Check that your draft is still there</li>
* <li>Open Saved Messages chat (could be any other chat too)
* <li>Go to another app and share some text to DC
* <li>In DC select Saved Messages. Edit the shared text if you like. <em>Don't</em> hit the
* Send button.
* <li>Leave DC
* <li>Open DC again from the "Recent apps"
* <li>Check that your draft is still there
* </ul>
*/
@Test
public void testOpenAgainFromRecents() {
// Open a chat
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
onView(withId(R.id.list))
.perform(
RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
// Share some text to DC
Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_TEXT, "Veeery important draft");
i.setComponent(new ComponentName(getInstrumentation().getTargetContext().getApplicationContext(), ShareActivity.class));
i.setComponent(
new ComponentName(
getInstrumentation().getTargetContext().getApplicationContext(), ShareActivity.class));
activityRule.getScenario().onActivity(a -> a.startActivity(i));
// In DC, select the same chat you opened before
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
onView(withId(R.id.list))
.perform(
RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
// Leave DC and go back to the previous activity
pressBack();
// Here, we can't exactly replicate the "steps to reproduce". Previously, the other activity
// stayed open in the background, but since it doesn't anymore, we need to open it again:
onView(withId(R.id.list)).perform(RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
onView(withId(R.id.list))
.perform(
RecyclerViewActions.actionOnItem(hasDescendant(withText("abc@example.org")), click()));
// Check that the draft is still there
// Util.sleep(2000); // Uncomment for debugging
onView(withHint(R.string.chat_input_placeholder)).check(matches(withText("Veeery important draft")));
onView(withHint(R.string.chat_input_placeholder))
.check(matches(withText("Veeery important draft")));
}
/**
* Regression test:
*
* If you save your contacts's emails in the contacts app of the phone, there are buttons to call
* them and also to write an email to them.
* <p>If you save your contacts's emails in the contacts app of the phone, there are buttons to
* call them and also to write an email to them.
*
* If you click the email button, ArcaneChat opened but instead of opening a chat with that contact,
* the chat list was show and "share with" was displayed at the top
* <p>If you click the email button, Delta Chat opened but instead of opening a chat with that
* contact, the chat list was show and "share with" was displayed at the top
*/
@Test
public void testOpenChatFromContacts() {
@@ -1,6 +1,5 @@
package com.b44t.messenger.uitests.online;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.replaceText;
@@ -11,13 +10,10 @@ import static androidx.test.espresso.matcher.ViewMatchers.withHint;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import android.text.TextUtils;
import androidx.test.ext.junit.rules.ActivityScenarioRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import com.b44t.messenger.TestUtils;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
@@ -30,14 +26,16 @@ import org.thoughtcrime.securesms.WelcomeActivity;
@LargeTest
public class OnboardingTest {
@Rule
public ActivityScenarioRule<WelcomeActivity> activityRule = TestUtils.getOnlineActivityRule(WelcomeActivity.class);
public ActivityScenarioRule<WelcomeActivity> activityRule =
TestUtils.getOnlineActivityRule(WelcomeActivity.class);
@Test
public void testAccountCreation() {
if (TextUtils.isEmpty(BuildConfig.TEST_ADDR) || TextUtils.isEmpty(BuildConfig.TEST_MAIL_PW)) {
throw new RuntimeException("You need to set TEST_ADDR and TEST_MAIL_PW; " +
"either in gradle.properties or via an environment variable. " +
"See README.md for more details.");
throw new RuntimeException(
"You need to set TEST_ADDR and TEST_MAIL_PW; "
+ "either in gradle.properties or via an environment variable. "
+ "See README.md for more details.");
}
onView(withText(R.string.scan_invitation_code)).check(matches(isClickable()));
onView(withText(R.string.import_backup_title)).check(matches(isClickable()));
@@ -0,0 +1,19 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="228"
android:viewportHeight="280">
<group
android:scaleX="0.35014287"
android:scaleY="0.43"
android:translateX="74.08372"
android:translateY="79.8">
<path
android:pathData="m10.03,234.14c0.3,-0.01 0.6,-0.02 0.9,-0.04 -0.07,-0.49 -0.14,-0.97 -0.2,-1.46 -0.15,-1.34 -0.26,-2.69 -0.25,-4.04 -0.02,-0.86 -0.05,-1.71 -0.07,-2.57 -0.09,-0.06 -0.18,-0.13 -0.27,-0.19 -0.02,-0.02 -0.04,-0.03 -0.07,-0.05zM44.87,232.95c11.71,-8.35 26.86,-14.79 46.21,-15.9 0,0 39.93,-0.27 47.91,-3.53 7.98,-3.26 68.68,-14.69 82.94,-98.43 14.26,-83.74 -1.06,-115.09 -1.06,-115.09 0,0 -21.14,55.68 -81.02,59.81 0,0 -14.5,1.03 -38.82,1.42 -24.32,0.39 -75.77,20.65 -90.55,85.62l-0.22,43.44c2.5,4.22 5.49,8.12 8.91,11.66 3.99,4.11 8.11,8.12 12.79,11.45 2.26,1.65 4.65,3.2 6.51,5.33 1.94,2.34 3.33,5 4.2,7.93 0.71,2.1 1.45,4.2 2.2,6.28z"
android:fillColor="@color/ic_launcher_background" />
<path
android:pathData="m217.97,45.86c-0.3,0.01 -0.6,0.02 -0.9,0.04 0.07,0.49 0.14,0.97 0.2,1.46 0.15,1.34 0.26,2.69 0.25,4.04 0.02,0.86 0.05,1.71 0.07,2.57 0.09,0.06 0.18,0.13 0.27,0.19 0.02,0.02 0.04,0.03 0.07,0.05zM183.13,47.05c-11.71,8.35 -26.86,14.79 -46.21,15.9 0,0 -39.93,0.27 -47.91,3.53 -7.98,3.26 -68.68,14.69 -82.94,98.43 -14.26,83.74 1.06,115.09 1.06,115.09 0,0 21.14,-55.68 81.02,-59.81 0,0 14.5,-1.03 38.82,-1.42 24.32,-0.39 75.77,-20.65 90.55,-85.62l0.22,-43.44c-2.5,-4.22 -5.49,-8.12 -8.91,-11.66 -3.99,-4.11 -8.11,-8.12 -12.79,-11.45 -2.26,-1.65 -4.65,-3.2 -6.51,-5.33 -1.94,-2.34 -3.33,-5 -4.2,-7.93 -0.71,-2.1 -1.45,-4.2 -2.2,-6.28z"
android:fillColor="@color/ic_launcher_background" />
</group>
</vector>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/white" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/white" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
+11 -9
View File
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<application>
<service
android:name=".connect.KeepAliveService"
android:foregroundServiceType="specialUse"
android:enabled="true" />
</application>
<application>
<service
android:name=".connect.KeepAliveService"
android:foregroundServiceType="specialUse"
android:enabled="true" />
</application>
</manifest>
@@ -1,7 +1,6 @@
package org.thoughtcrime.securesms.notifications;
import android.content.Context;
import androidx.annotation.Nullable;
/*
@@ -10,6 +9,11 @@ import androidx.annotation.Nullable;
*/
public class FcmReceiveService {
public static void register(Context context) {}
public static void waitForRegisterFinished() {}
@Nullable public static String getToken() { return null; }
@Nullable
public static String getToken() {
return null;
}
}
+34 -26
View File
@@ -1,34 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- force compiling emojipicker on sdk<21 and firebase on sdk<19; runtime checks are required then -->
<uses-sdk tools:overrideLibrary="androidx.emoji2.emojipicker, com.google.firebase.messaging, com.google.android.gms.cloudmessaging"/>
<!-- force compiling emojipicker on sdk<21 and firebase on sdk<19; runtime checks are required then -->
<uses-sdk
tools:overrideLibrary="androidx.emoji2.emojipicker, com.google.firebase.messaging, com.google.android.gms.cloudmessaging" />
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false" />
<meta-data
android:name="firebase_analytics_collection_deactivated"
android:value="true" />
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false" />
<meta-data
android:name="firebase_messaging_auto_init_enabled"
android:value="false" />
<application>
<service
android:name=".connect.KeepAliveService"
android:foregroundServiceType="dataSync"
android:enabled="true" />
<application>
<service
android:name=".connect.KeepAliveService"
android:foregroundServiceType="dataSync"
android:enabled="true" />
<service
android:name=".notifications.FcmReceiveService"
android:foregroundServiceType="dataSync"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".notifications.FcmReceiveService"
android:foregroundServiceType="dataSync"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="${applicationId}.firebaseinitprovider"
tools:node="remove">
</provider>
</application>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="${applicationId}.firebaseinitprovider"
tools:node="remove">
</provider>
</application>
</manifest>
@@ -1,20 +1,16 @@
package org.thoughtcrime.securesms.notifications;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import com.google.android.gms.tasks.Tasks;
import com.google.firebase.FirebaseApp;
import com.google.firebase.messaging.FirebaseMessaging;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import org.thoughtcrime.securesms.ApplicationContext;
import org.thoughtcrime.securesms.BuildConfig;
import org.thoughtcrime.securesms.service.FetchForegroundService;
@@ -35,36 +31,38 @@ public class FcmReceiveService extends FirebaseMessagingService {
return;
}
Util.runOnAnyBackgroundThread(() -> {
final String rawToken;
Util.runOnAnyBackgroundThread(
() -> {
final String rawToken;
try {
synchronized (INIT_LOCK) {
if (!initialized) {
// manual init: read tokens from `./google-services.json`;
// automatic init disabled in AndroidManifest.xml to skip FCM code completely.
FirebaseApp.initializeApp(context);
try {
synchronized (INIT_LOCK) {
if (!initialized) {
// manual init: read tokens from `./google-services.json`;
// automatic init disabled in AndroidManifest.xml to skip FCM code completely.
FirebaseApp.initializeApp(context);
}
initialized = true;
}
rawToken = Tasks.await(FirebaseMessaging.getInstance().getToken());
} catch (Exception e) {
// we're here usually when FCM is not available and initializeApp() or getToken()
// failed.
Log.w(TAG, "cannot get FCM token for " + BuildConfig.APPLICATION_ID + ": " + e);
triedRegistering = true;
return;
}
if (TextUtils.isEmpty(rawToken)) {
Log.w(TAG, "got empty FCM token for " + BuildConfig.APPLICATION_ID);
triedRegistering = true;
return;
}
initialized = true;
}
rawToken = Tasks.await(FirebaseMessaging.getInstance().getToken());
} catch (Exception e) {
// we're here usually when FCM is not available and initializeApp() or getToken() failed.
Log.w(TAG, "cannot get FCM token for " + BuildConfig.APPLICATION_ID + ": " + e);
triedRegistering = true;
return;
}
if (TextUtils.isEmpty(rawToken)) {
Log.w(TAG, "got empty FCM token for " + BuildConfig.APPLICATION_ID);
triedRegistering = true;
return;
}
prefixedToken = addPrefix(rawToken);
Log.i(TAG, "FCM token: " + prefixedToken);
ApplicationContext.getDcAccounts().setPushDeviceToken(prefixedToken);
triedRegistering = true;
});
prefixedToken = addPrefix(rawToken);
Log.i(TAG, "FCM token: " + prefixedToken);
ApplicationContext.getDcAccounts().setPushDeviceToken(prefixedToken);
triedRegistering = true;
});
}
// wait a until FCM registration got a token or not.
@@ -91,7 +89,20 @@ public class FcmReceiveService extends FirebaseMessagingService {
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
Log.i(TAG, "FCM push notification received");
FetchForegroundService.start(this);
// Note: The system can downgrade the high priority messages to normal priority
// if the app is not using the high priority messages for surfacing time sensitive
// content to the user. If the message's priority is downgraded, your app cannot
// start a foreground service and attempting to start one results in a
// ForegroundServiceStartNotAllowedException.
// So, it's recommended to check the result of RemoteMessage.getPriority() and
// confirm it's PRIORITY_HIGH() before attempting to start a foreground service.
// source:
// https://developer.android.com/develop/background-work/services/fgs/restrictions-bg-start
if (remoteMessage.getPriority() == RemoteMessage.PRIORITY_HIGH) {
FetchForegroundService.start(this);
} else {
FetchForegroundService.fetchSynchronously();
}
}
@Override
+16 -18
View File
@@ -38,6 +38,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<!-- force compiling emojipicker on sdk<21; runtime checks are required then -->
<uses-sdk tools:overrideLibrary="androidx.emoji2.emojipicker"/>
@@ -54,7 +55,6 @@
android:requestLegacyExternalStorage="true"
tools:targetApi="TIRAMISU"
android:hasFragileUserData="true"
android:enableOnBackInvokedCallback="false"
>
<!-- android car support, see https://developer.android.com/training/auto/start/,
@@ -93,6 +93,7 @@
<intent-filter>
<data android:scheme="mailto"/>
<action android:name="android.intent.action.SENDTO"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
@@ -208,16 +209,7 @@
<activity android:name=".NewConversationActivity"
android:theme="@style/TextSecure.LightNoActionBar"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:exported="true">
<intent-filter>
<data android:scheme="mailto"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
</activity>
<activity android:name=".ContactMultiSelectionActivity"
@@ -229,15 +221,14 @@
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".WelcomeActivity"
android:launchMode="singleTask"
android:launchMode="singleTop"
android:theme="@style/TextSecure.LightNoActionBar"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".relay.EditRelayActivity"
android:launchMode="singleTask"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:exported="true">
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
</activity>
<activity android:name=".relay.RelayListActivity"
@@ -365,15 +356,13 @@
<activity android:name=".calls.CallActivity"
android:label=""
android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize|uiMode"
android:exported="true">
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize|uiMode">
</activity>
<activity android:name=".WebxdcActivity"
android:label=""
android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize|uiMode"
android:exported="true">
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize|uiMode">
</activity>
<activity android:name=".WebxdcStoreActivity"
@@ -403,6 +392,15 @@
android:name=".service.FetchForegroundService"
android:foregroundServiceType="dataSync" />
<service
android:name=".service.AudioPlaybackService"
android:foregroundServiceType="mediaPlayback"
android:exported="true">
<intent-filter>
<action android:name="androidx.media3.session.MediaSessionService"/>
</intent-filter>
</service>
<receiver android:name=".notifications.MarkReadReceiver"
android:enabled="true"
android:exported="false">
File diff suppressed because one or more lines are too long
+133 -117
View File
@@ -15,7 +15,7 @@
<li><a href="#what-do-the-ticks-shown-beside-outgoing-messages-mean">What do the ticks shown beside outgoing messages mean?</a></li>
<li><a href="#edit">Correct typos and delete messages after sending</a></li>
<li><a href="#ephemeralmsgs">How do disappearing messages work?</a></li>
<li><a href="#delold">What happens if I turn on “Delete old messages from device”?</a></li>
<li><a href="#delold">What happens if I turn on “Delete Messages from Device”?</a></li>
<li><a href="#remove-account">How can I delete my chat profile?</a></li>
</ul>
</li>
@@ -26,6 +26,7 @@
<li><a href="#kdyź-se-nedopatřením-odstraníš">Kdyź se nedopatřením odstraníš.</a></li>
<li><a href="#nechci-již-přijímat-zprávy-ze-skupiny">Nechci již přijímat zprávy ze skupiny.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">How does Delta Chat protect metadata in messages?</a></li>
<li><a href="#device-seizure">How to protect metadata and contacts when a device is seized?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
</li>
</ul>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
<h3 id="multiple-accounts">
@@ -262,14 +260,11 @@ or to <strong>Switch Profiles</strong>.</p>
</h3>
<ul>
<li>
<p>Profilový obrázek lze zvolit v nastavení. Když napíšeš svému kontaktu,
<p>Profilový obrázek lze zvolit v nastavení. Když napíšeš svému kontaktu,
nebo přidáš nový vyfocením QR kódu, tyto kontakty automaticky uvidí tvůj profilový obrázek.</p>
</li>
<li>
<p>Z důvodu soukromí nikdo nevidí tvůj profilový obrázek dokud jim nenapíšeš.</p>
</li>
<ul>
<li>Z důvodu soukromí nikdo nevidí tvůj profilový obrázek dokud jim nenapíšeš.</li>
</ul>
<h3 id="signature">
@@ -304,7 +299,8 @@ they will see it when they view your contact details.</p>
</li>
<li>
<p><strong>Archive chats</strong> if you do not want to see them in your chat list any longer.
Archived chats remain accessible above the chat list or via search.</p>
They remain accessible above the chat list or via search
and are marked by <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Archived</b></p>
</li>
<li>
<p>When an archived chat gets a new message, unless muted, it will <strong>pop out of the archive</strong> and back into your chat list.
@@ -339,7 +335,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -376,22 +372,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -456,19 +448,18 @@ the (anyway encrypted) messages may take longer to get deleted from their server
<h3 id="delold">
What happens if I turn on “Delete old messages from device”? <a href="#delold" class="anchor"></a>
What happens if I turn on “Delete Messages from Device”? <a href="#delold" class="anchor"></a>
</h3>
<ul>
<li>If you want to save storage on your device, you can choose to delete old
messages automatically.</li>
<li>To turn it on, go to “delete old messages from device” in the “Chats &amp; Media”
settings. You can set a timeframe between “after an hour” and “after a year”;
<p>If you want to save storage on your device, you can choose to delete old
messages automatically.</p>
<p>To turn it on, go to <strong>Settings → Chats → Delete Message from Device</strong>.
You can set a timeframe between “after an hour” and “after a year”;
this way, <em>all</em> messages will be deleted from your device as soon as they are
older than that.</li>
</ul>
older than that.</p>
<h3 id="remove-account">
@@ -516,9 +507,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Z menu v pravém horním rohu, nebo stiskem příslušného tlačítka na Androidu / iOS vyber <strong>Nový hovor</strong> a pak <strong>Nová skupina</strong>.</li>
<li>Na další obrazovce, vyber <strong>členy skupiny</strong> a zadej <strong>Název skupiny</strong>. Také můžeš vybrat <strong>obrázek skupiny</strong>.</li>
<li>Jakmile do skupiny pošleš <strong>první zprávu</strong>, všichni členové budou vyrozuměni o nové skupině a mohou do ní také psát (dokud nepošleš první zprávu členové skupiny o ní nebudou vědět).</li>
<li>
<p>Z menu v pravém horním rohu, nebo stiskem příslušného tlačítka na Androidu / iOS vyber <strong>Nový hovor</strong> a pak <strong>Nová skupina</strong>.</p>
</li>
<li>
<p>Na další obrazovce, vyber <strong>členy skupiny</strong> a zadej <strong>Název skupiny</strong>. Také můžeš vybrat  <strong>obrázek skupiny</strong>.</p>
</li>
<li>
<p>Jakmile do skupiny pošleš <strong>první zprávu</strong>, všichni členové budou vyrozuměni o nové skupině a mohou do ní také psát (dokud nepošleš první zprávu členové skupiny o ní nebudou vědět).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -529,11 +526,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -561,10 +557,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Když nejsi členem skupiny nelze se znovu připojit. Nicméně, není to velká potíž -
požádej běžnou zprávou jiného člena skupiny o znovupřipojení.</li>
</ul>
<p>Když nejsi členem skupiny nelze se znovu připojit. Nicméně, není to velká potíž -
požádej běžnou zprávou jiného člena skupiny o znovupřipojení.</p>
<h3 id="nechci-již-přijímat-zprávy-ze-skupiny">
@@ -575,15 +569,12 @@ požádej běžnou zprávou jiného člena skupiny o znovupřipojení.</li>
</h3>
<ul>
<li>
<p>Buď se odeber ze seznamu členů a nebo vymaž celý skupinový hovor.
K opětovnému připojení v budoucnu požádej nějakého člena skupiny o znovupřidání.</p>
</li>
<li>
<p>Jiná možnost je “Umlčení” skupiny, což znamená nadále přijímat a také posílat zprávy,
ale nebudeš dostávat upozrnění na nově příchozí zprávy.</p>
</li>
<li>Buď se odeber ze seznamu členů a nebo vymaž celý skupinový hovor.
K opětovnému připojení v budoucnu požádej nějakého člena skupiny o znovupřidání.</li>
</ul>
<p>Jiná možnost je “Umlčení” skupiny, což znamená nadále přijímat a také posílat zprávy,
ale nebudeš dostávat upozrnění na nově příchozí zprávy.</p>
<h3 id="cloning-a-group">
@@ -609,6 +600,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -897,7 +903,7 @@ One device is not needed for the other to work.</p>
<p>Double-check both devices are in the <strong>same Wi-Fi or network</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -991,10 +997,10 @@ Všechny softwarové balíčky jsou na <a href="https://get.delta.chat">get.delt
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1030,7 +1036,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1153,9 +1159,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Dobrý začátek je <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standards used in Delta Chat</a>.</li>
</ul>
<p>Dobrý začátek je <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standards used in Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1184,6 +1188,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1368,12 +1376,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1394,6 +1400,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1423,7 +1455,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1434,12 +1466,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1449,12 +1478,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1633,52 +1663,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Sometimes we receive one-time donations from private individuals.
+186 -175
View File
@@ -15,7 +15,7 @@
<li><a href="#was-bedeuten-die-häkchen-neben-den-ausgehenden-nachrichten">Was bedeuten die Häkchen neben den ausgehenden Nachrichten?</a></li>
<li><a href="#edit">Schreibfehler korrigieren und Nachrichten nach dem Senden löschen</a></li>
<li><a href="#ephemeralmsgs">Wie funktionieren “Verschwindende Nachrichten”?</a></li>
<li><a href="#delold">Was passiert, wenn ich “Alte Nachrichten vom Gerät löschen” aktiviere?</a></li>
<li><a href="#delold">Was passiert, wenn ich “Nachrichten vom Gerät löschen” aktiviere?</a></li>
<li><a href="#remove-account">Wie kann ich mein Chat-Profil löschen?</a></li>
</ul>
</li>
@@ -26,6 +26,7 @@
<li><a href="#ich-habe-mich-selbst-versehentlich-gelöscht">Ich habe mich selbst versehentlich gelöscht.</a></li>
<li><a href="#ich-möchte-keine-nachrichten-einer-gruppe-mehr-empfangen">Ich möchte keine Nachrichten einer Gruppe mehr empfangen.</a></li>
<li><a href="#eine-gruppe-klonen">Eine Gruppe klonen</a></li>
<li><a href="#wie-viele-mitglieder-können-in-einer-einzelnen-gruppe-sein">Wie viele Mitglieder können in einer einzelnen Gruppe sein?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-Chat-Apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#erweitert">Erweitert</a>
<ul>
<li><a href="#experimentelle-features">Experimentelle Features</a></li>
<li><a href="#experiments">Experimentelle Features</a></li>
<li><a href="#relays">Was sind Relays?</a></li>
<li><a href="#kann-ich-eine-klassische-e-mail-adresse-mit-delta-chat-verwenden">Kann ich eine klassische E-Mail-Adresse mit Delta Chat verwenden?</a></li>
<li><a href="#classic-email">Wie kann ich ein Chat-Profil mit einer klassischen E-Mail-Adresse als Relay konfigurieren?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Sind mit dem Mail-Symbol markierte Nachrichten im Internet sichtbar?</a></li>
<li><a href="#message-metadata">Wie schützt Delta Chat Metadaten in Nachrichten?</a></li>
<li><a href="#device-seizure">Wie schützt man Metadaten und Kontakte, wenn ein Gerät beschlagnahmt wird?</a></li>
<li><a href="#wer-sieht-meine-ip-adresse">Wer sieht meine IP-Adresse?</a></li>
<li><a href="#sealedsender">Unterstützt Delta Chat „Sealed Sender“?</a></li>
<li><a href="#pfs">Unterstützt Delta Chat “Perfect Forward Secrecy”?</a></li>
<li><a href="#pqc">Unterstützt Delta Chat Post-Quantum-Verschlüsselung?</a></li>
@@ -177,7 +179,7 @@ wird eine Ende-zu-Ende-Verschlüsselung zwischen allen Mitgliedern eingerichtet.
<p>Da Delta Chat ein privater Messenger ist, können dir zunächst nur Freunde und Familienmitglieder, denen du deinen <a href="#howtoe2ee">QR-Code oder Einladungslink</a> schickst, schreiben.</p>
<p>Deine Freunde können deine Kontaktdaten dann mit anderen Freunden teilen. Dies wird als <strong>Anfrage</strong> angezeigt.</p>
<p>Deine Freunde können deine Kontaktdaten dann mit anderen Freunden teilen. Dies wird als <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Anfrage</b> angezeigt.</p>
<ul>
<li>
@@ -215,15 +217,10 @@ kann darauf tippen, um mit dem ersten Kontakt zu chatten.</p>
</h3>
<ul>
<li>
<p>Ja. Bilder, Videos, Dateien, Sprachnachrichten und mehr können über die <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Anhang-</strong>
bzw. <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Sprachnachricht</strong>-Buttons hinzugefügt werden</p>
</li>
<li>
<p>Um die Leistung zu verbessern, werden die Bilder standardmäßig optimiert und in einer kleineren Größe gesendet, aber du kannst sie auch als “Datei” senden, um das Original zu erhalten.</p>
</li>
</ul>
<p>Ja. Bilder, Videos, Dateien, Sprachnachrichten und mehr können über die <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Anhang-</strong>
bzw. <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Sprachnachricht</strong>-Buttons hinzugefügt werden</p>
<p>Um die Leistung zu verbessern, werden die Bilder standardmäßig optimiert und in einer kleineren Größe gesendet, aber du kannst sie auch als “Datei” senden, um das Original zu erhalten.</p>
<h3 id="multiple-accounts">
@@ -254,14 +251,9 @@ oder <strong>Profile zu wechseln</strong>.</p>
</h3>
<ul>
<li>
<p>Du kannst ein Profilbild in den Einstellungen hinzufügen. Wenn du deinen Kontakten eine Nachricht sendest oder sie über einen QR-Code hinzufügst, sehen diese automatisch dein Profilbild.</p>
</li>
<li>
<p>Aus Datenschutzgründen sieht niemand dein Profilbild, dem du nicht zuvor eine Nachricht gesendet hast.</p>
</li>
</ul>
<p>Du kannst ein Profilbild in den Einstellungen hinzufügen. Wenn du deinen Kontakten eine Nachricht sendest oder sie über einen QR-Code hinzufügst, sehen diese automatisch dein Profilbild.</p>
<p>Aus Datenschutzgründen sieht niemand dein Profilbild, dem du nicht zuvor eine Nachricht gesendet hast.</p>
<h3 id="signature">
@@ -293,7 +285,7 @@ Sobald du eine Nachricht an einen Kontakt sendest, kann dieser deine Signatur in
<p><strong>Stummgeschaltete Chats</strong> erhalten keine Benachrichtigungen, bleiben ansonsten aber an ihrem Platz. Du kannst auch stummgeschaltete Chats anheften.</p>
</li>
<li>
<p><strong>Archiviere Chats</strong>, wenn du diese nicht mehr in deiner Chatliste sehen möchtest. Archivierte Chats bleiben oberhalb der Chatliste oder über die Suche zugänglich.</p>
<p><strong>Archiviere Chats</strong>, wenn du diese nicht mehr in deiner Chatliste sehen möchtest; sie bleiben oberhalb der Chatliste oder über die Suche zugänglich und werden als <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Archiviert</b> gekennzeichnet</p>
</li>
<li>
<p>Wenn ein archivierter Chat eine neue Nachricht erhält, wird er, sofern er nicht stummgeschaltet ist, <strong>wieder in die normale Chatliste verschoben</strong>. <strong>Stummgeschaltete Chats bleiben archiviert</strong>, bis du sie manuell aus dem Archiv entfernst.</p>
@@ -359,18 +351,16 @@ sei es durch den <a href="#edit">Absender</a>, durch <a href="#delold">Automatis
<ul>
<li>
<p><strong>Ein Häkchen</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" /> bedeutet, dass die Nachricht erfolgreich versandt wurde.</p>
<p><strong>Ein Häkchen</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" /> bedeutet, dass die Nachricht erfolgreich versandt wurde und das <a href="#relays">Relay</a> erreicht hat.</p>
</li>
<li>
<p><strong>Zwei Häkchen</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" /> bedeuten, dass mindestens ein Gerät des Empfängers zurückgemeldet hat, die Nachricht empfangen zu haben.</p>
</li>
<li>
<p>Lesebestätigungen können deaktiviert werden. D.h. auch wenn du nur ein Häkchen siehst, kann die Nachricht gelesen worden sein.</p>
</li>
<li>
<p>Umgekehrt bedeuten zwei Häkchen nicht automatisch, dass ein Mensch die Nachricht gelesen oder verstanden hat ;)</p>
<p><strong>Zwei Häkchen</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" /> bedeuten, dass der Empfänger die Nachricht gelesen hat.</p>
</li>
</ul>
<p>In <a href="#groups">Gruppen</a> bedeutet das zweite Häkchen, dass die Nachricht von mindestens einem Mitglied gelesen wurde.</p>
<p>Du erhälst nur dann das zweite Häkchen, wenn sowohl du als auch einer der Empfänger, die die Nachricht gelesen haben, <strong>Einstellungen → Chats → Lesebestätigungen</strong> aktiviert haben.</p>
<h3 id="edit">
@@ -430,15 +420,14 @@ oder auf andere Weise Nachrichten vor dem Löschen speichern, kopieren oder weit
<h3 id="delold">
Was passiert, wenn ich “Alte Nachrichten vom Gerät löschen” aktiviere? <a href="#delold" class="anchor"></a>
Was passiert, wenn ich “Nachrichten vom Gerät löschen” aktiviere? <a href="#delold" class="anchor"></a>
</h3>
<ul>
<li>Wenn du Speicherplatz auf deinem Gerät sparen möchtest, kannst du alte Nachrichten automatisch löschen lassen.</li>
<li>Hierzu, öffne die “Chats und Medien”-Einstellungen und dort “Alte Nachrichten vom Gerät löschen”. Du kannst einen Zeitraum zwischen “1 Stunde” und “1 Jahr” festlegen; auf diese Weise werden <em>alle</em> Nachrichten von deinem Gerät gelöscht, sobald sie älter als angegeben sind.</li>
</ul>
<p>Wenn du Speicherplatz auf deinem Gerät sparen möchtest, kannst du alte Nachrichten automatisch löschen lassen.</p>
<p>Hierzu, öffne <strong>Einstellungen → Chats → Nachrichten vom Gerät löschen</strong>. Du kannst einen Zeitraum zwischen “1 Stunde” und “1 Jahr” festlegen; auf diese Weise werden alleNachrichten von deinem Gerät gelöscht, sobald sie älter als angegeben sind.</p>
<h3 id="remove-account">
@@ -485,9 +474,15 @@ und seine <a href="#edit">eigenen Nachrichten von Geräten der Mitglieder lösch
</h3>
<ul>
<li>Wähle <strong>Neuer Chat</strong> und dann <strong>Neue Gruppe</strong> aus dem Menü oben rechts oder über das entsprechende Symbol unter Android/iOS.</li>
<li>Wähle auf dem folgenden Bildschirm die <strong>Gruppenmitglieder</strong> aus und klicke auf das Häkchen in der oberen rechten Ecke. Danach kannst du einen <strong>Gruppennamen</strong> und auch einen <strong>Gruppenbild</strong> festlegen.</li>
<li>Sobald du die <strong>erste Nachricht</strong> in die Gruppe schreibst, werden alle Mitglieder über die neue Gruppe informiert und können in der Gruppe antworten (solange du keine Nachricht in die Gruppe schreibst, ist die Gruppe für die Gruppenmitglieder nicht sichtbar).</li>
<li>
<p>Wähle <strong>Neuer Chat</strong> und dann <strong>Neue Gruppe</strong> aus dem Menü oben rechts oder über das entsprechende Symbol unter Android/iOS.</p>
</li>
<li>
<p>Wähle auf dem folgenden Bildschirm die <strong>Gruppenmitglieder</strong> aus und klicke auf das Häkchen in der oberen rechten Ecke. Danach kannst du einen <strong>Gruppennamen</strong> und auch einen <strong>Gruppenbild</strong>  festlegen.</p>
</li>
<li>
<p>Sobald du die <strong>erste Nachricht</strong> in die Gruppe schreibst, werden alle Mitglieder über die neue Gruppe informiert und können in der Gruppe antworten (solange du keine Nachricht in die Gruppe schreibst, ist die Gruppe für die Gruppenmitglieder nicht sichtbar).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -498,10 +493,9 @@ und seine <a href="#edit">eigenen Nachrichten von Geräten der Mitglieder lösch
</h3>
<p>Alle Gruppenmitglieder haben <strong>dieselben Rechte</strong>. Jeder kann daher jeden löschen oder weitere Mitglieder hinzufügen.</p>
<ul>
<li>
<p>Alle Gruppenmitglieder haben <strong>dieselben Rechte</strong>. Jeder kann daher jeden löschen oder weitere Mitglieder hinzufügen.</p>
</li>
<li>
<p>Um <strong>Mitglieder hinzuzufügen oder zu entfernen</strong>, tippe im Chat auf den Gruppennamen und wähle das Mitglied aus, das du hinzufügen oder entfernen möchtest.</p>
</li>
@@ -523,10 +517,8 @@ und seine <a href="#edit">eigenen Nachrichten von Geräten der Mitglieder lösch
</h3>
<ul>
<li>Da du kein Gruppenmitglied mehr bist, kannst du sich selbst nicht mehr hinzufügen.
Kein Problem, bitte einfach ein anderes Gruppenmitglied in einem normalen Chat, dich hinzuzufügen.</li>
</ul>
<p>Da du kein Gruppenmitglied mehr bist, kannst du sich selbst nicht mehr hinzufügen.
Kein Problem, bitte einfach ein anderes Gruppenmitglied in einem normalen Chat, dich hinzuzufügen.</p>
<h3 id="ich-möchte-keine-nachrichten-einer-gruppe-mehr-empfangen">
@@ -537,14 +529,11 @@ Kein Problem, bitte einfach ein anderes Gruppenmitglied in einem normalen Chat,
</h3>
<ul>
<li>
<p>Lösche dich entweder aus der Mitgliederliste oder lösche den gesamten Chat.
Wenn du der Gruppe später erneut beitreten möchtest, bitten ein anderes Gruppenmitglied, dich hinzuzufügen.</p>
</li>
<li>
<p>Alternativ kannst du eine Gruppe auch “stummschalten” - dies bedeutet, dass du weiterhin alle Nachrichten erhälst und neue schreiben kannst, aber nicht mehr über neue Nachrichten informiert wirst.</p>
</li>
<li>Lösche dich entweder aus der Mitgliederliste oder lösche den gesamten Chat.
Wenn du der Gruppe später erneut beitreten möchtest, bitten ein anderes Gruppenmitglied, dich hinzuzufügen.</li>
</ul>
<p>Alternativ kannst du eine Gruppe auch “stummschalten” - dies bedeutet, dass du weiterhin alle Nachrichten erhälst und neue schreiben kannst, aber nicht mehr über neue Nachrichten informiert wirst.</p>
<h3 id="eine-gruppe-klonen">
@@ -570,6 +559,19 @@ oder klicken mit der rechten Maustaste auf die Gruppe in der Chat-Liste (Desktop
<p>Die neue Gruppe ist <strong>völlig unabhängig</strong> von der ursprünglichen,
die weiterhin wie bisher funktioniert.</p>
<h3 id="wie-viele-mitglieder-können-in-einer-einzelnen-gruppe-sein">
Wie viele Mitglieder können in einer einzelnen Gruppe sein? <a href="#wie-viele-mitglieder-können-in-einer-einzelnen-gruppe-sein" class="anchor"></a>
</h3>
<p>Es gibt keine technische Begrenzung,
aber mehr als 150 sind nicht empfohlen.</p>
<p>Wenn Gruppen größer werden, können sie sozial instabil werden und benötigen möglicherweise eine Hierarchie - und Delta Chat ist ein privater Messenger für Chats mit <a href="#groups">gleichen Rechten</a>. Vgl. <a href="https://de.wikipedia.org/wiki/Dunbar-Zahl">Dunbar-Zahl</a>.</p>
<h2 id="webxdc">
@@ -841,7 +843,7 @@ Einschließlich dem Chatmail-Server, <a href="https://delta.chat/chatmail#selfho
<p>Vergewissere dich, dass beide Geräte mit dem <strong>gleichen Wi-Fi, WLAN oder Netzwerk</strong> verbunden sind.</p>
</li>
<li>
<p>Unter <strong>Windows</strong>, <strong>Systemsteuerung / Netzwerk und Internet</strong> öffnen
<p>Unter <strong>Windows</strong>, “Systemsteuerung / Netzwerk und Internet” öffnen
und sicherstellen, dass <strong>Privates Netzwerk</strong> als “Netzwerkprofiltyp” ausgewählt ist.
(nach der Übertragung kann wieder der ursprüngliche Wert verwendet werden)</p>
</li>
@@ -920,10 +922,10 @@ Wenn du iOS verwendest und auf Schwierigkeiten stößt, hilft dir vielleicht <a
</h2>
<h3 id="experimentelle-features">
<h3 id="experiments">
Experimentelle Features <a href="#experimentelle-features" class="anchor"></a>
Experimentelle Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -981,24 +983,23 @@ Im Zweifelsfall entferne das Relay später.</p>
</h3>
<p>Yes, but only if the email address is used exclusively by <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p>Ja, aber nur, wenn die E-Mail-Adresse ausschließlich von <a href="https://chatmail.at/clients">Chatmail-Clients</a> verwendet wird.</p>
<p>It is not supported to share usage of an email address with non-chatmail apps or web-based mailers,
for the following reasons:</p>
<p>Die gemeinsame Nutzung einer E-Mail-Adresse mit Nicht-Chatmail-Apps oder webbasierten Mailprogrammen wird aus folgenden Gründen nicht unterstützt:</p>
<ul>
<li>
<p>Non-chatmail apps are largely not accomplishing automatic end-to-end email encryption for their users,
while chatmail apps and relays pervasively enforce end-to-end encryption and security standards.</p>
<p>Nicht-Chatmail-Apps bieten ihren Nutzern größtenteils keine automatische End-to-End-Verschlüsselung,
während Chatmail-Apps und Relays durchgängig End-to-End-Verschlüsselung und Sicherheitsstandards durchsetzen.</p>
</li>
<li>
<p>Non-chatmail apps use email servers as a long-term message archive
while chatmail clients use email servers for ephemeral instant message relay.</p>
<p>Nicht-Chatmail-Anwendungen nutzen E-Mail-Server als langfristiges Nachrichtenarchiv,
während Chatmail-Clients E-Mail-Server für die kurzlebige Weiterleitung von Nachrichten verwenden.</p>
</li>
<li>
<p>Supporting the full variety of classic email setups
would require considerable development and maintenance efforts,
and complicate making chatmail-based messaging more resilient, reliable and fast.</p>
<p>Die Unterstützung der gesamten Bandbreite klassischer E-Mail-Konfigurationen
würde einen erheblichen Entwicklungs- und Wartungsaufwand erfordern
und Chatmail-basiertes Messaging weniger robust, zuverlässig und schnell machen.</p>
</li>
</ul>
@@ -1010,17 +1011,15 @@ and complicate making chatmail-based messaging more resilient, reliable and fast
</h3>
<p>First off, <strong>please do not use the same classic email address also from non-chatmail classic email apps</strong>
unless you are prepared to deal with encrypted messages in the inbox,
double notifications, accidentally deleted emails or similar annoyances.</p>
<p>Zunächst einmal, <strong>verwenden bitte nicht dieselbe klassische E-Mail-Adresse auch in anderen klassischen E-Mail-Anwendungen</strong>,
es sei denn, du bist sind bereit, dich mit verschlüsselten Nachrichten im Posteingang,
doppelten Benachrichtigungen, versehentlich gelöschten E-Mails oder ähnlichen Ärgernissen auseinanderzusetzen.</p>
<p>You can configure a email address for chatting at <strong>New Profile → Use Other Server → Use Classic Mail as Relay</strong>.
Note that classic email providers will generally not support <a href="#instant-delivery">Push Notifications</a>
and have other limitations, see <a href="https://providers.delta.chat">Provider Overview</a>.
Chatmail uses the default INBOX for relay; ensure the provider setup does too.
A chat profile using a classic email address allows to to send and receive unencrypted messages.
These messages, and the chats they appear in, are marked with an email icon
<img style="vertical-align:middle; width:1.2em; margin:1px" src="../email-icon.png" alt="email" />.</p>
<p>Sie können eine E-Mail-Adresse unter <strong>Neues Profil → Anderen Server verwenden → Klassische E-Mail als Relay</strong> konfigurieren.
Beachten Sie, dass klassische E-Mail-Anbieter in der Regel keine <a href="#instant-delivery">Push-Benachrichtigungen</a> unterstützen
und andere Einschränkungen haben, siehe <a href="https://providers.delta.chat">Provider-Overview</a>.
Chatmail verwendet den Standard-INBOX für die Weiterleitung; stellen Sie sicher, dass dies auch bei der Einrichtung Ihres Anbieters der Fall ist.
Ein Chat-Profil mit klassischer E-Mail-Adresse, ermöglicht das Senden und Empfangen unverschlüsselter Nachrichten; diese sind mit dem E-Mail-Symbol <img style="vertical-align:middle; width:1.2em; margin:1px" src="../email-icon.png" alt="email" /> gekennzeichnet.</p>
<h3 id="ich-möchte-meinen-eigenen-server-für-delta-chat-verwalten-gibt-es-empfehlungen">
@@ -1030,13 +1029,13 @@ These messages, and the chats they appear in, are marked with an email icon
</h3>
<p>Any well behaving email server setup will do fine
except if your users’ devices require Google/Apple <a href="#instant-delivery">Push Notifications</a> to work properly.</p>
<p>Jede gut funktionierende E-Mail-Server-Konfiguration ist geeignet,
es sei denn, die Geräte Ihrer Benutzer erfordern Google/Apple <a href="#instant-delivery">Push-Benachrichtigungen</a>, um ordnungsgemäß zu funktionieren.</p>
<p>We generally recommend to <a href="https://chatmail.at/doc/relay/getting_started.html">set up a chatmail relay</a>.
<a href="https://chatmail.at">Chatmail</a> is a community-driven project that encompasses both the setup of relays
and <a href="https://github.com/chatmail/core">core Rust developments</a>
that power <a href="https://chatmail.at/clients">chatmail clients</a> of which Delta Chat is the most well known.</p>
<p>Wir empfehlen generell, <a href="https://chatmail.at/doc/relay/getting_started.html">ein Chatmail-Relay einzurichten</a>.
<a href="https://chatmail.at">Chatmail</a> ist ein Community-basiertes Projekt, das sowohl die Einrichtung von Relays
als auch <a href="https://github.com/chatmail/core">Entwicklungen in Rust</a>
für die <a href="https://chatmail.at/clients">Chatmail-Clients</a> umfasst, von denen Delta Chat der bekannteste ist.</p>
<h3 id="statssending">
@@ -1046,31 +1045,31 @@ that power <a href="https://chatmail.at/clients">chatmail clients</a> of which D
</h3>
<p>We would like to improve Delta Chat with your help,
which is why Delta Chat for Android asks whether you want
to send anonymous usage statistics.</p>
<p>Wir möchten Delta Chat mit deiner Hilfe verbessern.
Deshalb fragt Delta Chat für Android, ob du
anonyme Nutzungsstatistiken senden möchtest.</p>
<p>You can turn it on and off at
<strong>Settings → Advanced → Send statistics to Delta Chat’s developers</strong>.</p>
<p>Du kannst dies unter
<strong>Einstellungen → Erweitert → Statistik an Delta Chat Entwickler senden</strong> ein- und ausschalten.</p>
<p>When you turn it on,
weekly statistics will be automatically sent to a bot.</p>
<p>Wenn eingeschaltet,
werden wöchentlich Statistiken automatisch an einen Bot gesendet.</p>
<p>We are interested e.g. in statistics like:</p>
<p>Wir sind beispielsweise an folgenden Statistiken interessiert:</p>
<ul>
<li>
<p>How many contacts are introduced by personally scanning a QR code?</p>
<p>Wie viele Kontakte werden durch das persönliche Scannen eines QR-Codes hergestellt?</p>
</li>
<li>
<p>Which versions of Delta Chat are being used?</p>
<p>Welche Versionen von Delta Chat werden verwendet?</p>
</li>
<li>
<p>What errors occur for users?</p>
<p>Welche Fehler treten bei Benutzern auf?</p>
</li>
</ul>
<p>We will <em>not</em> collect any personally identifiable information about you.</p>
<p>Wir werden <em>keinerlei</em> personenbezogene Daten über dich sammeln.</p>
<h3 id="ich-bin-an-technischen-details-interessiert-gibt-es-hierzu-weitere-infos">
@@ -1080,9 +1079,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Siehe hierzu <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">in Delta Chat genutzte Standards</a>.</li>
</ul>
<p>Siehe hierzu <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">in Delta Chat genutzte Standards</a>.</p>
<h2 id="e2ee">
@@ -1110,6 +1107,10 @@ zum Austausch von Verschlüsselungsinformationen durch Scannen von QR-Codes oder
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> wird verwendet, um automatisch eine Ende-zu-Ende-Verschlüsselung zwischen Kontakten und allen Mitgliedern einer Gruppe herzustellen.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, dessen vollständige Implementierung für 2026 geplant ist,
wir post-quantum-resistente Verschlüsselung und Forward Secrecy einführen.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Teilen eines Kontakts im Chat</a>
ermöglicht es den Empfängern, eine Ende-zu-Ende-Verschlüsselung mit dem Kontakt zu verwenden.</p>
@@ -1149,16 +1150,15 @@ Seit der Veröffentlichung von Delta Chat Version 2 (Juli 2025) gibt es keine Sc
</h3>
<p>A contact profile might show a green checkmark
<p>Ein Kontaktprofile kann ein grünes Häkchen
<img style="vertical-align:middle; width:1.5em; margin:1px" src="../green-checkmark.png" alt="green checkmark" />
and an “Introduced by” line.
Every green-checkmarked contact either did a direct <a href="#howtoe2ee">QR-scan</a> with you
or was introduced by a another green-checkmarked contact.
Introductions happen automatically when adding members to groups.
Whoever adds a green-checkmarked contact to a group with only green-checkmarked members
becomes an introducer.
In a contact profile you can tap on the “Introduced by …” text repeatedly
until you get to the one with whom you directly did a <a href="#howtoe2ee">QR-scan</a>.</p>
und “Eingeführt von” enthalten.
Jeder so markierte Kontakt hat entweder einen direkten <a href="#howtoe2ee">QR-Scan</a> mit Ihnen durchgeführt
oder wurde von einem anderen Kontakt mit grünem Häkchen eingeführt.
Das Einführen geschieht automatisch, wenn Sie Mitglieder zu Gruppen hinzufügen.
Wer einen Kontakt mit grünem Häkchen zu einer Gruppe hinzufügt, wird zum Einführenden.
In einem Kontaktprofil können Sie wiederholt auf den Text “Eingeführt von” tippen
bis Sie zu demjenigen gelangen, mit dem Sie einen direkten <a href="#howtoe2ee">QR-Scan</a> gemacht haben.</p>
<p>Für eine ausführlichere Diskussion der “Garantierten Ende-zu-Ende-Verschlüsselung”,
siehe <a href="https://securejoin.delta.chat/en/latest/new.html">Secure-Join-Protokolle</a>
@@ -1284,15 +1284,13 @@ selbst wenn die Nachricht nicht Ende-zu-Ende-verschlüsselt war.</p>
speichern Delta-Chat-Apps keine Metadaten über Kontakte oder Gruppen auf Servern. Auch nicht in verschlüsselter Form.
Stattdessen werden alle Gruppen-Metadaten durchgängig verschlüsselt und ausschließlich auf den Endgeräten der Nutzer gespeichert.</p>
<p>Servers can therefore only see:</p>
<p>Server können daher nur das folgende sehen:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Absender- und Empfängeradressen, standardmäßig zufällig generiert</li>
<li>Größe der Nachricht</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>Alle anderen Metadaten zu Nachrichten, Kontakten und Gruppen befinden sich im Ende-zu-Ende-verschlüsselten Teil der Nachrichten.</p>
<h3 id="device-seizure">
@@ -1303,15 +1301,41 @@ Stattdessen werden alle Gruppen-Metadaten durchgängig verschlüsselt und aussch
</h3>
<p>Both for protecting against metadata-collecting servers
as well as against the threat of device seizure
we recommend to use a <a href="https://chatmail.at/relays">chatmail relay</a>
to create chat profiles using random addresses for transport.
Note that Delta Chat apps on all platforms support multiple profiles
so you can easily use situation-specific profiles next to your “main” profile
with the knowledge that all their data, along with all metadata, will be deleted.
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<p>Sowohl zum Schutz vor Servern, die Metadaten sammeln,
als auch als Schutz bei Beschlagnahmung von Geräten
empfehlen wir die Verwendung eines <a href="https://chatmail.at/relays">Chatmail-Relays</a>,
um Chat-Profile mit zufälligen Adressen für den Transport zu erstellen.
Beachte, dass Delta-Chat-Apps mehrere Profile unterstützen,
sodass du neben deinem „Hauptprofil” ganz einfach situationsspezifische Profile verwenden kannst,
mit der Gewissheit, dass alle Daten sowie alle Metadaten gelöscht werden.
Darüber hinaus können Chat-Kontakte, die kurzlebige Profile verwenden,
im Falle einer Beschlagnahmung des Geräts nicht ohne Weiteres identifiziert werden.</p>
<h3 id="wer-sieht-meine-ip-adresse">
Wer sieht meine IP-Adresse? <a href="#wer-sieht-meine-ip-adresse" class="anchor"></a>
</h3>
<p>Das verwendete <a href="#relays">Relay</a> muss Ihre IP-Adresse kennen,
sowie manchmal auch die Geräte Ihrer Kontakte, wenn Sie einen <a href="#experiments">Anruf</a> tätigen
oder gemeinsam <a href="#webxdc">Apps</a> verwenden.</p>
<p>IP-Adressen sind für Verbindungen und für Effizienz erforderlich.
Sie werden weder gespeichert noch offengelegt.
Beachten Sie, dass die IP-Adresse
nicht mit einer Adresse, die Sie einem Lieferdienst geben, vergleichbar ist -
sondern viel gröber ist und oft nur die Region oder das Land angibt.</p>
<p>Da dies die Standardfunktion des Internets und anderer Messenger ist,
bieten wir hier keine Optionen an und stellen auch keine Fragen im Voraus.</p>
<p>Wenn Sie Ihre IP-Adresse als Sicherheits- oder Datenschutzrisiko betrachten,
empfehlen wir Ihnen, ein VPN in Kombination mit dem System-Lockdown-Modus zu verwenden.
Alle einzelnen Apps auf Ihrem System nach IP-Optionen abzusuchen wird nicht zufriedenstellen sein;
beispielsweise legt das Antippen eines Links IP-Adressen gegenüber unbekannten Parteien offen und stellt hier das weitaus größere Risiko dar.</p>
<h3 id="sealedsender">
@@ -1321,18 +1345,17 @@ can not be identified easily.</p>
</h3>
<p>Nein, noch nichts.</p>
<p>Nein, noch nicht.</p>
<p>Der Signal-Messenger führte 2018 <a href="https://signal.org/blog/sealed-sender/">“Sealed Sender”</a> ein
um seine Serverinfrastruktur darüber im Unklaren zu lassen, wer eine Nachricht an eine Gruppe von Empfängern sendet.
Dies ist besonders wichtig, weil der Signal-Server die Handynummer jedes Kontos kennt,
die in der Regel mit einer Passidentität verbunden ist.</p>
<p>Even if <a href="https://chatmail.at/relays">chatmail relays</a>
do not ask for any private data (including no phone numbers),
it might still be worthwhile to protect relational metadata between addresses.
We don’t foresee bigger problems in using random throw-away addresses for sealed sending
but an implementation has not been agreed as a priority yet.</p>
<p>Auch wenn <a href="https://chatmail.at/relays">Chatmail-Relays</a>
keine privaten Daten (einschließlich Telefonnummern) abfragen,
könnte es dennoch sinnvoll sein, Metadaten zwischen Adressen zu schützen.
Wir sehen keine größeren Probleme bei der Verwendung von zufälligen Wegwerfadressen für aber eine Umsetzung wurde noch nicht als priorisiert.</p>
<h3 id="pfs">
@@ -1342,23 +1365,20 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>Nein, noch nichts.</p>
<p>Noch nicht, aber es kommt mit <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
and someone has collected your prior in-transit messages,
they will be able to decrypt and read them using the leaked decryption key.
Note that Forward Secrecy only increases security if you delete messages.
Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>Delta Chat unterstützt derzeit keine Perfect Forward Secrecy (PFS).
Das bedeutet, dass, wenn Ihr privater Schlüssel offengelegt wird
und jemand Ihre früheren Nachrichten während der Übertragung gesammelt hat,
diese mit dem offengelegten Schlüssel entschlüsselt und gelesen werden können.
Beachten Sie, dass Forward Secrecy die Sicherheit nur erhöht, wenn du Nachrichten löschst.
Andernfalls kann jemand, der deinen Schlüssel erhält,
in der Regel auch alle deine nicht gelöschten Nachrichten abrufen
und muss zuvor gesammelte Nachrichten nicht einmal entschlüsseln.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, dessen vollständige Implementierung für 2026 geplant ist,
wird durch automatische Schlüsselrotation eine zuverlässige Löschung (Forward Secrecy) gewährleisten.
Dieser Ansatz ist im Entwurf <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> festgelegt.</p>
<h3 id="pqc">
@@ -1368,11 +1388,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>Nein, noch nichts.</p>
<p>Noch nicht, aber es kommt mit <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat verwendet die Rust OpenPGP-Bibliothek <a href="https://github.com/rpgp/rpgp">rPGP</a>
die den neuesten <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP Entwurf</a> unterstützt.
Wir beabsichtigen, PQC-Unterstützung zum <a href="https://github.com/chatmail/core">chatmail core</a> hinzuzufügen, sobald der Entwurf bei der IETF in Zusammenarbeit mit anderen OpenPGP-Implementierern fertiggestellt ist.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, dessen vollständige Implementierung für 2026 geplant ist,
wird eine post-quantum-resistente Verschlüsselung zum Schutz vor Angriffen durch Quantencomputer bieten.
Delta Chat verwendet die Rust-OpenPGP-Bibliothek <a href="https://github.com/rpgp/rpgp">rPGP</a>,
die den neuesten <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Kryptografie OpenPGP Entfurf</a> unterstützt.
Die Implementierung ist in <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> festgelegt.</p>
<h3 id="wie-kann-ich-die-verschlüsselung-manuell-überprüfen">
@@ -1398,12 +1420,11 @@ ist die Verbindung sicher.</p>
<p>Nein.</p>
<p>Delta Chat generates secure OpenPGP keys according to the Autocrypt specification 1.1.
We do not recommend or offer users to perform manual key management.
We want to ensure that security audits can focus on a few proven cryptographic algorithms
instead of the full breadth of possible algorithms allowed with OpenPGP.
If you want to extract your OpenPGP key, there only is an expert method:
you need to look it up in the “keypairs” SQLite table of a profile backup tar-file.</p>
<p>Delta Chat generiert sichere OpenPGP-Schlüssel gemäß der Autocrypt-Spezifikation 1.1.
Wir bieten Benutzern keine manuelle Schlüsselverwaltung an, noch empfehlen diese.
Wir wollen sicherstellen, dass sich Sicherheitsüberprüfungen auf einige wenige bewährte kryptografische Algorithmen konzentrieren können,
anstatt auf die gesamte Bandbreite der mit OpenPGP zulässigen Algorithmen.
Wenn Sie Ihren OpenPGP-Schlüssel extrahieren möchten, gibt es nur eine Methode für Experten: Sie müssen ihn in der SQLite-Tabelle „keypairs” des Backups nachschlagen.</p>
<h3 id="security-audits">
@@ -1465,10 +1486,10 @@ Es wurden keine kritischen Probleme gefunden, aber zwei Probleme mit hohem Schwe
</h3>
<p>Some features require certain permissions,
e.g. you need to grant camera permission if you want to <a href="#howtoe2ee">scan an invite QR code</a>.</p>
<p>Einige Features erfordern bestimmte Berechtigungen.
So muss z.B. der Kamerazugriff gewährt werden, wenn du einen <a href="#howtoe2ee">QR-Code scannen</a> möchtest.</p>
<p>See <a href="https://delta.chat/en/gdpr#24-app-permissions">Privacy Policy</a> for a detailed overview.</p>
<p>Siehe <a href="https://delta.chat/de/gdpr#24-berechtigungen-der-app">Datenschutzhinweise</a> für eine detaillierte Übersicht.</p>
<h3 id="wo-können-meine-freunde-delta-chat-finden">
@@ -1512,29 +1533,6 @@ Wir nutzen vielmehr öffentliche Finanzierungsquellen, die bisher aus der EU und
<p>Konkret wurden die Delta-Chat-Entwicklungen bisher aus diesen Quellen finanziert:</p>
<ul>
<li>
<p>Das EU-Projekt <a href="https://nextleap.eu">NEXTLEAP</a> finanzierte 2017 und 2018 die Entwicklung und Implementierung von “Verifizierten Gruppen” und “Setup Kontakt” und half auch bei der Integration der Ende-zu-Ende-Verschlüsselung durch <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Der <a href="https://opentechfund.org">Open Technology Fund</a> hat Delta Chat erstmals 2018/2019 bezuschusst; mit dieser Förderung (~$200K) wurden hauptsächlich die Android-App verbessert sowie das Release der Desktop-App in einer Betaversion ermöglicht. Basierend auf Nutzererfahrungen im Menschenrechtskontext wurden zudem verschiedene Funktionen entwickelt, siehe unseren Bericht <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
Die zweite Förderung 2019/2020 (~$300K) half uns bei der Erstellung der iOS-Version, unsere Kernbibliothek in die Programmiersprache “Rust” zu konvertieren und neue Funktionen für alle Plattformen bereitzustellen.</p>
</li>
<li>
<p>Die <a href="https://nlnet.nl/">NLnet-Stiftung</a> bewilligte 2019/2020 46K EUR für die Fertigstellung von Rust-/Python-Bindungs und die Einrichtung eines Chat-Bot-Ökosystems.</p>
</li>
<li>
<p>Im Jahr 2021 erhielten wir weitere EU-Mittel für zwei “Next-Generation-Internet”-Anträge, nämlich für <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - E-Mail-Provider-Portabilitätsverzeichnis</a> (~97K EUR) und <a href="https://nlnet.nl/project/EmailPorting/">AEAP - E-Mail-Adressportierung</a> (~90K EUR). Ziel sind bessere Unterstützung von Mehrfachkonten, verbesserten QR-Code-Kontakt- und -Gruppen-Setups sowie Netzwerkverbesserungen auf allen Plattformen.</p>
</li>
<li>
<p>Von Ende 2021 bis März 2023 erhielten wir eine <em>Internet-Freedom</em>-Finanzierung (500K USD) vom U.S. Bureau of Democracy, Human Rights and Labor (DRL). Diese Finanzierung unterstützte unsere langjährigen Ziele, Delta Chat benutzerfreundlicher und kompatibel mit einer breiten Palette von E-Mail-Servern weltweit zu machen, sowie widerstandsfähiger und sicherer an Orten, die häufig von Internetzensur und Abschaltungen betroffen sind.</p>
</li>
<li>
<p>2023-2024 schlossen wir erfolgreich das vom OTF finanzierte
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure-Chatmail-Projekt</a> ab.
Dieses fügt “Garantierte Verschlüsselung”,
das <a href="https://delta.chat/chatmail">Chatmail-Server-Netzwerk</a>
und „Instant Onboarding“ allen ab April 2024 veröffentlichten Anwendungen hinzu.</p>
</li>
<li>
<p>2023 und 2024 wurden wir in das Next-Generation-Internet-Programm (NGI)
für unsere Arbeit an <a href="https://nlnet.nl/project/WebXDC-Push/">Webxdc-PUSH</a> aufgenommen,
@@ -1545,6 +1543,19 @@ zusammen mit Kooperationspartnern, die an
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
Alle diese Projekte sind teilweise abgeschlossen oder sollen Anfang 2025 abgeschlossen werden.</p>
</li>
<li>
<p>Im Jahr 2021 erhielten wir weitere EU-Mittel für zwei “Next-Generation-Internet”-Anträge, nämlich für <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - E-Mail-Provider-Portabilitätsverzeichnis</a> (~97K EUR) und <a href="https://nlnet.nl/project/EmailPorting/">AEAP - E-Mail-Adressportierung</a> (~90K EUR). Ziel sind bessere Unterstützung von Mehrfachkonten, verbesserten QR-Code-Kontakt- und -Gruppen-Setups sowie Netzwerkverbesserungen auf allen Plattformen.</p>
</li>
<li>
<p>Die <a href="https://nlnet.nl/">NLnet-Stiftung</a> bewilligte 2019/2020 46K EUR für die Fertigstellung von Rust-/Python-Bindungs und die Einrichtung eines Chat-Bot-Ökosystems.</p>
</li>
<li>
<p>Der <a href="https://opentechfund.org">Open Technology Fund</a> hat Delta Chat erstmals 2018/2019 bezuschusst; mit dieser Förderung (~$200K) wurden hauptsächlich die Android-App verbessert sowie das Release der Desktop-App in einer Betaversion ermöglicht. Basierend auf Nutzererfahrungen im Menschenrechtskontext wurden zudem verschiedene Funktionen entwickelt, siehe unseren Bericht <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
Die zweite Förderung 2019/2020 (~$300K) half uns bei der Erstellung der iOS-Version, unsere Kernbibliothek in die Programmiersprache “Rust” zu konvertieren und neue Funktionen für alle Plattformen bereitzustellen.</p>
</li>
<li>
<p>Das EU-Projekt <a href="https://nextleap.eu">NEXTLEAP</a> finanzierte 2017 und 2018 die Entwicklung und Implementierung von “Verifizierten Gruppen” und “Setup Kontakt” und half auch bei der Integration der Ende-zu-Ende-Verschlüsselung durch <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Manchmal erhalten wir einmalige Spenden von Privatpersonen, wofür wir sehr dankbar sind. Im Jahr 2021 hat uns zum Beispiel eine großzügige Privatperson 4000 EUR überwiesen mit dem Betreff “Weiter so!” 💜 Wir verwenden dieses Geld zur Finanzierung von Entwicklungstreffen oder zur Deckung von Ad-hoc-Ausgaben, die nicht ohne weiteres vorhersehbar sind oder nicht aus öffentlichen Fördermitteln erstattet werden können.
Der Erhalt von Spenden hilft uns auch, unabhängiger und langfristig lebensfähig zu werden, als Gemeinschaft.</p>
+132 -118
View File
@@ -15,7 +15,7 @@
<li><a href="#what-do-the-ticks-shown-beside-outgoing-messages-mean">What do the ticks shown beside outgoing messages mean?</a></li>
<li><a href="#edit">Correct typos and delete messages after sending</a></li>
<li><a href="#ephemeralmsgs">How do disappearing messages work?</a></li>
<li><a href="#delold">What happens if I turn on “Delete old messages from device”?</a></li>
<li><a href="#delold">What happens if I turn on “Delete Messages from Device”?</a></li>
<li><a href="#remove-account">How can I delete my chat profile?</a></li>
</ul>
</li>
@@ -26,6 +26,7 @@
<li><a href="#i-have-deleted-myself-by-accident">I have deleted myself by accident.</a></li>
<li><a href="#i-do-not-want-to-receive-the-messages-of-a-group-any-longer">I do not want to receive the messages of a group any longer.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">How does Delta Chat protect metadata in messages?</a></li>
<li><a href="#device-seizure">How to protect metadata and contacts when a device is seized?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
</li>
</ul>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
<h3 id="multiple-accounts">
@@ -262,16 +260,11 @@ or to <strong>Switch Profiles</strong>.</p>
</h3>
<ul>
<li>
<p>You can add a profile picture in your settings. If you write to your contacts
<p>You can add a profile picture in your settings. If you write to your contacts
or add them via QR code, they automatically see it as your profile picture.</p>
</li>
<li>
<p>For privacy reasons, no one sees your profile picture until you write a
<p>For privacy reasons, no one sees your profile picture until you write a
message to them.</p>
</li>
</ul>
<h3 id="signature">
@@ -305,7 +298,8 @@ they will see it when they view your contact details.</p>
</li>
<li>
<p><strong>Archive chats</strong> if you do not want to see them in your chat list any longer.
Archived chats remain accessible above the chat list or via search.</p>
They remain accessible above the chat list or via search
and are marked by <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Archived</b></p>
</li>
<li>
<p>When an archived chat gets a new message, unless muted, it will <strong>pop out of the archive</strong> and back into your chat list.
@@ -340,7 +334,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -377,22 +371,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -457,19 +447,18 @@ the (anyway encrypted) messages may take longer to get deleted from their server
<h3 id="delold">
What happens if I turn on “Delete old messages from device”? <a href="#delold" class="anchor"></a>
What happens if I turn on “Delete Messages from Device”? <a href="#delold" class="anchor"></a>
</h3>
<ul>
<li>If you want to save storage on your device, you can choose to delete old
messages automatically.</li>
<li>To turn it on, go to “delete old messages from device” in the “Chats &amp; Media”
settings. You can set a timeframe between “after an hour” and “after a year”;
<p>If you want to save storage on your device, you can choose to delete old
messages automatically.</p>
<p>To turn it on, go to <strong>Settings → Chats → Delete Message from Device</strong>.
You can set a timeframe between “after an hour” and “after a year”;
this way, <em>all</em> messages will be deleted from your device as soon as they are
older than that.</li>
</ul>
older than that.</p>
<h3 id="remove-account">
@@ -517,9 +506,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Select <strong>New chat</strong> and then <strong>New group</strong> from the menu in the upper right corner or hit the corresponding button on Android/iOS.</li>
<li>On the following screen, select the <strong>group members</strong> and define a <strong>group name</strong>. You can also select a <strong>group avatar</strong>.</li>
<li>As soon as you write the <strong>first message</strong> in the group, all members are informed about the new group and can answer in the group (as long as you do not write a message in the group the group is invisible to the members).</li>
<li>
<p>Select <strong>New chat</strong> and then <strong>New group</strong> from the menu in the upper right corner or hit the corresponding button on Android/iOS.</p>
</li>
<li>
<p>On the following screen, select the <strong>group members</strong> and define a <strong>group name</strong>. You can also select a <strong>group avatar</strong>.</p>
</li>
<li>
<p>As soon as you write the <strong>first message</strong> in the group, all members are informed about the new group and can answer in the group (as long as you do not write a message in the group the group is invisible to the members).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -530,11 +525,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -562,10 +556,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>As you’re no longer a group member, you cannot add yourself again.
However, no problem, just ask any other group member in a normal chat to re-add you.</li>
</ul>
<p>As you’re no longer a group member, you cannot add yourself again.
However, no problem, just ask any other group member in a normal chat to re-add you.</p>
<h3 id="i-do-not-want-to-receive-the-messages-of-a-group-any-longer">
@@ -576,15 +568,12 @@ However, no problem, just ask any other group member in a normal chat to re-add
</h3>
<ul>
<li>
<p>Either delete yourself from the member list or delete the whole chat.
If you want to join the group again later on, ask another group member to add you again.</p>
</li>
<li>
<p>As an alternative, you can also “Mute” a group - doing so means you get all messages and
can still write, but are no longer notified of any new messages.</p>
</li>
<li>Either delete yourself from the member list or delete the whole chat.
If you want to join the group again later on, ask another group member to add you again.</li>
</ul>
<p>As an alternative, you can also “Mute” a group - doing so means you get all messages and
can still write, but are no longer notified of any new messages.</p>
<h3 id="cloning-a-group">
@@ -610,6 +599,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -898,7 +902,7 @@ One device is not needed for the other to work.</p>
<p>Double-check both devices are in the <strong>same Wi-Fi or network</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -993,10 +997,10 @@ or the AppImage for Linux. You can find them on
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1032,7 +1036,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1155,9 +1159,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>See <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standards used in Delta Chat</a>.</li>
</ul>
<p>See <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standards used in Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1186,6 +1188,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1370,12 +1376,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1396,6 +1400,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1425,7 +1455,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1436,12 +1466,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1451,12 +1478,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1635,52 +1663,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Sometimes we receive one-time donations from private individuals.
+128 -116
View File
@@ -26,6 +26,7 @@
<li><a href="#me-he-eliminado-por-accidente">Me he eliminado por accidente.</a></li>
<li><a href="#no-quiero-recibir-más-los-mensajes-de-un-grupo">No quiero recibir más los mensajes de un grupo.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">¿Cómo Delta Chat protege los metadatos en los mensajes?</a></li>
<li><a href="#device-seizure">¿Cómo proteger los metadatos y los contactos cuando se incauta un dispositivo?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">¿Soporta Delta Chat Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -221,15 +224,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>Para mejorar el rendimiento, las imágenes se optimizan y se envían en un tamaño más pequeño de forma predeterminada, pero puedes enviarla como un “archivo” para conservar la original.</p>
</li>
</ul>
<p>Para mejorar el rendimiento, las imágenes se optimizan y se envían en un tamaño más pequeño de forma predeterminada, pero puedes enviarla como un “archivo” para conservar la original.</p>
<h3 id="multiple-accounts">
@@ -260,15 +258,10 @@ o para <strong>Cambiar perfiles</strong>.</p>
</h3>
<ul>
<li>
<p>Puede agregar una foto de perfil en su configuración. Si escribe a sus contactos
<p>Puede agregar una foto de perfil en su configuración. Si escribe a sus contactos
o los agrega a través de un código QR, ellos lo verán automáticamente como su foto de perfil.</p>
</li>
<li>
<p>Por cuestiones de privacidad, nadie verá su foto de perfil hasta que les escriba un mensaje.</p>
</li>
</ul>
<p>Por cuestiones de privacidad, nadie verá su foto de perfil hasta que les escriba un mensaje.</p>
<h3 id="signature">
@@ -301,8 +294,7 @@ they will see it when they view your contact details.</p>
<p><strong>Chats muteados</strong> si no quieres recibir notificaciones de ellos. Chats muteados se mantienen en su lugar e inclusive puedes fijarlos.</p>
</li>
<li>
<p><strong>Archivar chats</strong> si no deseas verlos en tu lista de chats.
Los chats archivados siguen siendo accesibles arriba de la lista de chats o a través de la búsqueda.</p>
<p><strong>Archivar chats</strong> si no deseas verlos en tu lista de chats. Los chats archivados siguen siendo accesibles arriba de la lista de chats o a través de la búsqueda.</p>
</li>
<li>
<p>Cuando un chat archivado recibe un nuevo mensaje, a menos que esté silenciado, <strong>saldrá del archivo</strong> y volverá a aparecer en tu lista de chats.
@@ -375,22 +367,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -460,14 +448,13 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>If you want to save storage on your device, you can choose to delete old
messages automatically.</li>
<li>To turn it on, go to “delete old messages from device” in the “Chats &amp; Media”
settings. You can set a timeframe between “after an hour” and “after a year”;
<p>If you want to save storage on your device, you can choose to delete old
messages automatically.</p>
<p>To turn it on, go to <strong>Settings → Chats → Delete Message from Device</strong>.
You can set a timeframe between “after an hour” and “after a year”;
this way, <em>all</em> messages will be deleted from your device as soon as they are
older than that.</li>
</ul>
older than that.</p>
<h3 id="remove-account">
@@ -515,9 +502,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Selecciona <strong>Nuevo chat</strong> y luego <strong>Nuevo grupo</strong> del menu en el sector superior derecho o toca en el botón correspondiente en Android/iOS.</li>
<li>En la siguiente pantalla selecciona a los <strong>miembros del grupo</strong> y define un <strong>nombre de grupo</strong>. Tambien puedes seleccionar un <strong>avatar de grupo</strong>.</li>
<li>Tan pronto escribas el <strong>primer mensaje</strong> en el grupo, todos los miembros serán informados sobre el nuevo grupo y podrán responder en él (mientras no escribas un mensaje será invisible para los miembros).</li>
<li>
<p>Selecciona <strong>Nuevo chat</strong> y luego <strong>Nuevo grupo</strong> del menu en el sector superior derecho o toca en el botón correspondiente en Android/iOS.</p>
</li>
<li>
<p>En la siguiente pantalla selecciona a los <strong>miembros del grupo</strong> y define un <strong>nombre de grupo</strong>. Tambien puedes seleccionar un <strong>avatar de grupo</strong>.</p>
</li>
<li>
<p>Tan pronto escribas el <strong>primer mensaje</strong> en el grupo, todos los miembros serán informados sobre el nuevo grupo y podrán responder en él (mientras no escribas un mensaje será invisible para los miembros).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -528,11 +521,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -560,10 +552,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Como ya no eres miembro del grupo, no puedes volver a agregarte.
Sin embargo, no hay problema, solo pídale a cualquier otro miembro del grupo en un chat normal que lo vuelva a agregar.</li>
</ul>
<p>Como ya no eres miembro del grupo, no puedes volver a agregarte.
Sin embargo, no hay problema, solo pídale a cualquier otro miembro del grupo en un chat normal que lo vuelva a agregar.</p>
<h3 id="no-quiero-recibir-más-los-mensajes-de-un-grupo">
@@ -574,15 +564,12 @@ Sin embargo, no hay problema, solo pídale a cualquier otro miembro del grupo en
</h3>
<ul>
<li>
<p>Elimínate de la lista de miembros o elimina todo el chat.
Si desea unirse al grupo nuevamente más tarde, pídale a otro miembro del grupo que lo agregue nuevamente.</p>
</li>
<li>
<p>Como alternativa, también puede “silenciar” a un grupo, lo que significa que recibirá todos los mensajes y
aún puede escribir, pero ya no se le notifican nuevos mensajes.</p>
</li>
<li>Elimínate de la lista de miembros o elimina todo el chat.
Si desea unirse al grupo nuevamente más tarde, pídale a otro miembro del grupo que lo agregue nuevamente.</li>
</ul>
<p>Como alternativa, también puede “silenciar” a un grupo, lo que significa que recibirá todos los mensajes y
aún puede escribir, pero ya no se le notifican nuevos mensajes.</p>
<h3 id="cloning-a-group">
@@ -608,6 +595,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -896,7 +898,7 @@ No es necesario un dispositivo para que el otro funcione.</p>
<p>Vuelve a verificar que ambos dispositivos estén en la <strong>misma Wi-Fi o red</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -991,10 +993,10 @@ o el AppImage para Linux. Puedes encontrarlos en
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1030,7 +1032,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1153,9 +1155,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Visita la página <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Estándares usados en Delta Chat</a>.</li>
</ul>
<p>Visita la página <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Estándares usados en Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1184,6 +1184,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1365,12 +1369,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1391,6 +1393,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1420,7 +1448,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1431,12 +1459,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1446,12 +1471,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1626,52 +1652,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>El proyecto de la UE <a href="https://nextleap.eu">NEXTLEAP</a> financió la investigación
e implementación de grupos verificados y protocolos de contacto
en 2017 y 2018 y también ayudó a integrar el cifrado de extremo a extremo
a través de <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>El proyecto de la UE <a href="https://nextleap.eu">NEXTLEAP</a> financió la investigación
e implementación de grupos verificados y protocolos de contacto
en 2017 y 2018 y también ayudó a integrar el cifrado de extremo a extremo
a través de <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Sometimes we receive one-time donations from private individuals.
+120 -104
View File
@@ -26,6 +26,7 @@
<li><a href="#jai-quitté-un-groupe-par-accident">J’ai quitté un groupe par accident.</a></li>
<li><a href="#je-ne-souhaite-plus-recevoir-les-messages-dun-groupe">Je ne souhaite plus recevoir les messages d’un groupe.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">How does Delta Chat protect metadata in messages?</a></li>
<li><a href="#device-seizure">How to protect metadata and contacts when a device is seized?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Oui. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Oui. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>Pour améliorer les performances, les images sont redimensionnées et envoyées en taille réduite par défaut ; mais vous pouvez les envoyer en tant que “fichier” pour en conserver la taille originale.</p>
</li>
</ul>
<p>Pour améliorer les performances, les images sont redimensionnées et envoyées en taille réduite par défaut ; mais vous pouvez les envoyer en tant que “fichier” pour en conserver la taille originale.</p>
<h3 id="multiple-accounts">
@@ -264,9 +262,7 @@ or to <strong>Switch Profiles</strong>.</p>
<p>Dans les paramètres vous pouvez ajouter une photo de profil. Si vous écrivez à vos contacts ou que vous les ajoutez via le QR code, ils la verront automatiquement comme votre photo de profil.</p>
<ul>
<li>Pour des raisons de confidentialité, personne ne peut voir votre photo de profil sans que vous ayez d’abord entamé une discussion.</li>
</ul>
<p>Pour des raisons de confidentialité, personne ne peut voir votre photo de profil sans que vous ayez d’abord entamé une discussion.</p>
<h3 id="signature">
@@ -299,8 +295,7 @@ they will see it when they view your contact details.</p>
<p>Utilisez la <strong>sourdine</strong> pour les discussions dont vous ne voulez pas recevoir les notifications. Les discussions en sourdine figurent toujours dans votre liste et peuvent aussi être les épinglées.</p>
</li>
<li>
<p><strong>Archivez les discussions</strong> si vous ne voulez plus les voir apparaître dans votre liste de discussions.
Les discussions archivées restent accessibles au-dessus de la liste de discussions ou via la recherche.</p>
<p><strong>Archivez les discussions</strong> si vous ne voulez plus les voir apparaître dans votre liste de discussions. Les discussions archivées restent accessibles au-dessus de la liste de discussions ou via la recherche.</p>
</li>
<li>
<p>Lorsqu’un nouveau message est envoyé sur une discussion que vous avez archivée, et que vous n’avez pas mise en sourdine, la discussion <strong>sort des archives</strong> et reprend sa place dans votre liste de discussions.
@@ -336,7 +331,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -373,22 +368,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -458,10 +449,9 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>Vous pouvez choisir de supprimer automatiquement les anciens messages pour libérer de l’espace de stockage sur votre appareil.</li>
<li>Pour activer cette option, ouvrez les paramètres des “Discussions et fichiers multimédias” et cliquez sur “Supprimer les anciens messages de l’appareil”. Vous pouvez définir le délai après lequel <em>tous</em> les messages seront supprimés de votre appareil, parmi plusieurs choix allant de “Immédiatement” à “Après 1 année”.</li>
</ul>
<p>Vous pouvez choisir de supprimer automatiquement les anciens messages pour libérer de l’espace de stockage sur votre appareil.</p>
<p>Pour activer cette option, ouvrez les paramètres des “Discussions et fichiers multimédias” et cliquez sur “Supprimer les anciens messages de l’appareil”. Vous pouvez définir le délai après lequel <em>tous</em> les messages seront supprimés de votre appareil, parmi plusieurs choix allant de “Immédiatement” à “Après 1 année”.</p>
<h3 id="remove-account">
@@ -509,9 +499,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Sélectionnez <strong>Nouvelle discussion</strong> puis <strong>Nouveau groupe</strong> dans le menu à trois points situé en haut à droite de la fenêtre ou son équivalent sous Android et iOS.</li>
<li>Sur l’écran suivant, sélectionnez <strong>Ajouter des participants</strong> et choisissez un <strong>Nom du groupe</strong>. Vous pouvez aussi choisir une <strong>image de groupe</strong>.</li>
<li>Lorsque vous enverrez le <strong>premier message</strong> dans le groupe, tous les membres en seront informés et pourront répondre. Le groupe est invisible aux autres membres si vous n’écrivez pas de premier message.</li>
<li>
<p>Sélectionnez <strong>Nouvelle discussion</strong> puis <strong>Nouveau groupe</strong> dans le menu à trois points situé en haut à droite de la fenêtre ou son équivalent sous Android et iOS.</p>
</li>
<li>
<p>Sur l’écran suivant, sélectionnez <strong>Ajouter des participants</strong> et choisissez un <strong>Nom du groupe</strong>. Vous pouvez aussi choisir une <strong>image de groupe</strong>.</p>
</li>
<li>
<p>Lorsque vous enverrez le <strong>premier message</strong> dans le groupe, tous les membres en seront informés et pourront répondre. Le groupe est invisible aux autres membres si vous n’écrivez pas de premier message.</p>
</li>
</ul>
<h3 id="addmembers">
@@ -522,11 +518,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -554,10 +549,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Comme vous n’êtes plus membre du groupe, vous ne pouvez pas vous y ajouter vous-même.
Contactez n’importe quel autre membre de ce groupe dans une discussion directe pour lui demander de vous y ré-inviter.</li>
</ul>
<p>Comme vous n’êtes plus membre du groupe, vous ne pouvez pas vous y ajouter vous-même.
Contactez n’importe quel autre membre de ce groupe dans une discussion directe pour lui demander de vous y ré-inviter.</p>
<h3 id="je-ne-souhaite-plus-recevoir-les-messages-dun-groupe">
@@ -568,14 +561,11 @@ Contactez n’importe quel autre membre de ce groupe dans une discussion directe
</h3>
<ul>
<li>
<p>Supprimez-vous de la liste des membres ou supprimez la discussion entière.
Si souhaitez rejoindre le groupe plus tard, demandez à un autre membre du groupe de vous ré-inviter.</p>
</li>
<li>
<p>Vous pouvez également mettre un groupe en “Sourdine” : vous recevrez tous les messages et pourrez toujours écrire, mais n’aurez plus les notifications des nouveaux messages.</p>
</li>
<li>Supprimez-vous de la liste des membres ou supprimez la discussion entière.
Si souhaitez rejoindre le groupe plus tard, demandez à un autre membre du groupe de vous ré-inviter.</li>
</ul>
<p>Vous pouvez également mettre un groupe en “Sourdine” : vous recevrez tous les messages et pourrez toujours écrire, mais n’aurez plus les notifications des nouveaux messages.</p>
<h3 id="cloning-a-group">
@@ -601,6 +591,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -887,7 +892,7 @@ L’un n’a pas besoin de l’autre pour pouvoir fonctionner.</p>
<p>Vérifier à nouveau que les deux appareils sont sur <strong>le même réseau ou le même Wi-Fi</strong>.</p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -978,10 +983,10 @@ end-to-end encrypted messages with your communication partners.</p>
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1017,7 +1022,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1140,9 +1145,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Consultez les <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">standards utilisés dans Delta Chat</a>.</li>
</ul>
<p>Consultez les <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">standards utilisés dans Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1172,6 +1175,9 @@ to exchange encryption setup information through QR-code scanning or “invite l
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, qui est prévu pour 2026, amènera un chiffrement avec résistance post-quantique ainsi que la confidentialité persistante (“forward secrecy”).</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
chat</a>
@@ -1355,12 +1361,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1381,6 +1385,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1389,7 +1419,7 @@ can not be identified easily.</p>
</h3>
<p>No, not yet.</p>
<p>Non, pas encore.</p>
<p>The Signal messenger introduced <a href="https://signal.org/blog/sealed-sender/">“Sealed Sender” in 2018</a>
to keep their server infrastructure ignorant of who is sending a message to a set of recipients.
@@ -1410,7 +1440,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Pas encore mais cela arrive avec <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1421,12 +1451,8 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, prévu pour 2026, permettra la suppression fiable (forward secrecy) grâce à une rotation automatique des clefs.
Cette approche est détaillée dans le brouillon du <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">certificat Autocrypt v2 OpenPGP</a>.</p>
<h3 id="pqc">
@@ -1436,12 +1462,11 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Pas encore mais cela arrive avec <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, prévu pour 2026, amènera un chiffrement avec résistance post-quantique pour protéger contre les attaques effectuées par des ordinateurs quantiques.
Delta Chat utilise la librairie Rust OpenPGP <a href="https://github.com/rpgp/rpgp">rPGP</a> qui supporte les dernières <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
L’implémentation est détaillée dans le brouillon du <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">certificat Autocrypt v2 OpenPGP</a>.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1599,47 +1624,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>L’association <a href="https://opentechfund.org">Open Technology Fund</a> nous a octroyé une première subvention en 2018/2019 (de 200.000$ environ), grâce à laquelle nous avons pu apporter des améliorations majeures à l’application Android et publier une première version Beta de l’application de bureau. Elle nous a aussi permis d’ancrer notre recherche UX de développement de fonctionnalités dans des contextes de droits humains. <br />
À ce sujet, vous pouvez consulter notre rapport en anglais <a href="https://delta.chat/en/2019-07-19-uxreport">“Needfinding and UX report”</a>.
La seconde subvention de 2019/2020 (environ 300.000$) nous a permis de publier des version iOS de Delta Chat, de convertir notre bibliothèque principale en Rust et de créer de nouvelles fonctionnalités pour toutes les plateformes.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Nous recevons parfois des dons ponctuels de la part de personnes privées.
+4
View File
@@ -6,6 +6,10 @@ a {
text-decoration: none;
}
a[href^='http']::after {
content: " ↗";
}
h2, h3, h4 {
margin-top: 2rem;
}
+133 -119
View File
@@ -15,7 +15,7 @@
<li><a href="#what-do-the-ticks-shown-beside-outgoing-messages-mean">What do the ticks shown beside outgoing messages mean?</a></li>
<li><a href="#edit">Correct typos and delete messages after sending</a></li>
<li><a href="#ephemeralmsgs">How do disappearing messages work?</a></li>
<li><a href="#delold">What happens if I turn on “Delete old messages from device”?</a></li>
<li><a href="#delold">What happens if I turn on “Delete Messages from Device”?</a></li>
<li><a href="#remove-account">How can I delete my chat profile?</a></li>
</ul>
</li>
@@ -26,6 +26,7 @@
<li><a href="#i-have-deleted-myself-by-accident">I have deleted myself by accident.</a></li>
<li><a href="#i-do-not-want-to-receive-the-messages-of-a-group-any-longer">I do not want to receive the messages of a group any longer.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">How does Delta Chat protect metadata in messages?</a></li>
<li><a href="#device-seizure">How to protect metadata and contacts when a device is seized?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
</li>
</ul>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
<h3 id="multiple-accounts">
@@ -262,16 +260,11 @@ or to <strong>Switch Profiles</strong>.</p>
</h3>
<ul>
<li>
<p>Anda dapat menambahkan gambar profil di pengaturan Anda. Jika Anda menulis ke kontak Anda
atau menambahkannya melalui kode QR, mereka secara otomatis melihatnya sebagai gambar profil Anda.</p>
</li>
<li>
<p>Untuk alasan kerahasiaan, tidak ada satupun yang dapat melihat Foto Profil anda hingga anda menulis
<p>Anda dapat menambahkan gambar profil di pengaturan Anda. Jika Anda menulis ke kontak Anda
atau menambahkannya melalui kode QR, mereka secara otomatis melihatnya sebagai gambar profil Anda.</p>
<p>Untuk alasan kerahasiaan, tidak ada satupun yang dapat melihat Foto Profil anda hingga anda menulis
sebuah pesan kepada mereka.</p>
</li>
</ul>
<h3 id="signature">
@@ -305,7 +298,8 @@ they will see it when they view your contact details.</p>
</li>
<li>
<p><strong>Archive chats</strong> if you do not want to see them in your chat list any longer.
Archived chats remain accessible above the chat list or via search.</p>
They remain accessible above the chat list or via search
and are marked by <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Archived</b></p>
</li>
<li>
<p>When an archived chat gets a new message, unless muted, it will <strong>pop out of the archive</strong> and back into your chat list.
@@ -340,7 +334,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -377,22 +371,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -457,19 +447,18 @@ the (anyway encrypted) messages may take longer to get deleted from their server
<h3 id="delold">
What happens if I turn on “Delete old messages from device”? <a href="#delold" class="anchor"></a>
What happens if I turn on “Delete Messages from Device”? <a href="#delold" class="anchor"></a>
</h3>
<ul>
<li>If you want to save storage on your device, you can choose to delete old
messages automatically.</li>
<li>To turn it on, go to “delete old messages from device” in the “Chats &amp; Media”
settings. You can set a timeframe between “after an hour” and “after a year”;
<p>If you want to save storage on your device, you can choose to delete old
messages automatically.</p>
<p>To turn it on, go to <strong>Settings → Chats → Delete Message from Device</strong>.
You can set a timeframe between “after an hour” and “after a year”;
this way, <em>all</em> messages will be deleted from your device as soon as they are
older than that.</li>
</ul>
older than that.</p>
<h3 id="remove-account">
@@ -517,9 +506,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Select <strong>New chat</strong> and then <strong>New group</strong> from the menu in the upper right corner or hit the corresponding button on Android/iOS.</li>
<li>On the following screen, select the <strong>group members</strong> and define a <strong>group name</strong>. You can also select a <strong>group avatar</strong>.</li>
<li>As soon as you write the <strong>first message</strong> in the group, all members are informed about the new group and can answer in the group (as long as you do not write a message in the group the group is invisible to the members).</li>
<li>
<p>Select <strong>New chat</strong> and then <strong>New group</strong> from the menu in the upper right corner or hit the corresponding button on Android/iOS.</p>
</li>
<li>
<p>On the following screen, select the <strong>group members</strong> and define a <strong>group name</strong>. You can also select a <strong>group avatar</strong>.</p>
</li>
<li>
<p>As soon as you write the <strong>first message</strong> in the group, all members are informed about the new group and can answer in the group (as long as you do not write a message in the group the group is invisible to the members).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -530,11 +525,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -562,10 +556,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>As you’re no longer a group member, you cannot add yourself again.
However, no problem, just ask any other group member in a normal chat to re-add you.</li>
</ul>
<p>As you’re no longer a group member, you cannot add yourself again.
However, no problem, just ask any other group member in a normal chat to re-add you.</p>
<h3 id="i-do-not-want-to-receive-the-messages-of-a-group-any-longer">
@@ -576,15 +568,12 @@ However, no problem, just ask any other group member in a normal chat to re-add
</h3>
<ul>
<li>
<p>Either delete yourself from the member list or delete the whole chat.
If you want to join the group again later on, ask another group member to add you again.</p>
</li>
<li>
<p>As an alternative, you can also “Mute” a group - doing so means you get all messages and
can still write, but are no longer notified of any new messages.</p>
</li>
<li>Either delete yourself from the member list or delete the whole chat.
If you want to join the group again later on, ask another group member to add you again.</li>
</ul>
<p>As an alternative, you can also “Mute” a group - doing so means you get all messages and
can still write, but are no longer notified of any new messages.</p>
<h3 id="cloning-a-group">
@@ -610,6 +599,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -898,7 +902,7 @@ One device is not needed for the other to work.</p>
<p>Double-check both devices are in the <strong>same Wi-Fi or network</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -993,10 +997,10 @@ or the AppImage for Linux. You can find them on
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1032,7 +1036,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1155,9 +1159,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>See <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standards used in Delta Chat</a>.</li>
</ul>
<p>See <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standards used in Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1186,6 +1188,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1370,12 +1376,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1396,6 +1400,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1425,7 +1455,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1436,12 +1466,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1451,12 +1478,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1635,52 +1663,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Terkadang kami menerima sumbangan satu kali dari perorangan.
+119 -108
View File
@@ -26,6 +26,7 @@
<li><a href="#mi-sono-cancellato-per-sbaglio">Mi sono cancellato per sbaglio.</a></li>
<li><a href="#non-desidero-più-ricevere-i-messaggi-di-un-gruppo">Non desidero più ricevere i messaggi di un gruppo.</a></li>
<li><a href="#clonazione-di-un-gruppo">Clonazione di un gruppo</a></li>
<li><a href="#quanti-membri-possono-partecipare-a-un-singolo-gruppo">Quanti membri possono partecipare a un singolo gruppo?</a></li>
</ul>
</li>
<li><a href="#webxdc">Apps in chat</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#avanzato">Avanzato</a>
<ul>
<li><a href="#funzionalità-sperimentali">Funzionalità Sperimentali</a></li>
<li><a href="#experiments">Funzionalità Sperimentali</a></li>
<li><a href="#relays">Cosa sono i ripetitori?</a></li>
<li><a href="#posso-usare-un-indirizzo-email-classico-con-delta-chat">Posso usare un indirizzo email classico con Delta Chat?</a></li>
<li><a href="#classic-email">Come posso configurare un profilo chat con un indirizzo email classico come inoltro?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">I messaggi contrassegnati dall’icona della posta sono esposti su Internet?</a></li>
<li><a href="#message-metadata">In che modo Delta Chat protegge i metadati nei messaggi?</a></li>
<li><a href="#device-seizure">Come proteggere i metadati e contatti quando un dispositivo viene sequestrato?</a></li>
<li><a href="#chi-vede-il-mio-indirizzo-ip">Chi vede il mio Indirizzo IP?</a></li>
<li><a href="#sealedsender">Delta Chat supporta “Mittente Sigillato”?</a></li>
<li><a href="#pfs">Delta Chat supporta Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Delta Chat supporta la Crittografia Post-Quantistica?</a></li>
@@ -185,7 +187,7 @@ Se vi aggiungete a vicenda a <a href="#groups">gruppi</a>, la crittografia end-t
<p>Essendo un messenger privato,
solo gli amici e i familiari con cui <a href="#howtoe2ee">condividi il tuo codice QR o il link di invito</a> possono scriverti.</p>
<p>I tuoi amici potrebbero condividere i tuoi contatti con altri amici; ciò apparirà come una <strong>richiesta</strong>.</p>
<p>I tuoi amici potrebbero condividere i tuoi contatti con altri amici; ciò apparirà come una <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Richiesta</b></p>
<ul>
<li>
@@ -223,15 +225,10 @@ e potrà toccarla per iniziare a chattare con il primo contatto.</p>
</h3>
<ul>
<li>
<p>Sì. Immagini, video, files, messaggi vocali ecc. possono essere inviati utilizzando <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Allegato-</strong>
<p>Sì. Immagini, video, files, messaggi vocali ecc. possono essere inviati utilizzando <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Allegato-</strong>
o <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> pulsanti <strong>Messaggio Vocale</strong></p>
</li>
<li>
<p>Per le prestazioni, le immagini sono ottimizzate e inviate in dimensioni inferiori per impostazione predefinita, ma è possibile inviarle come “file” per preservare l’originale.</p>
</li>
</ul>
<p>Per le prestazioni, le immagini sono ottimizzate e inviate in dimensioni inferiori per impostazione predefinita, ma è possibile inviarle come “file” per preservare l’originale.</p>
<h3 id="multiple-accounts">
@@ -262,16 +259,11 @@ o <strong>Cambiare Profili</strong>.</p>
</h3>
<ul>
<li>
<p>Puoi aggiungere un’immagine del profilo nelle tue impostazioni. Se scrivi ai tuoi contatti
<p>Puoi aggiungere un’immagine del profilo nelle tue impostazioni. Se scrivi ai tuoi contatti
o li aggiungi tramite codice QR, la vedranno automaticamente come immagine del tuo profilo.</p>
</li>
<li>
<p>Per motivi di privacy, nessuno vede la tua immagine del profilo finché non scrivi un
<p>Per motivi di privacy, nessuno vede la tua immagine del profilo finché non scrivi un
messaggio a loro.</p>
</li>
</ul>
<h3 id="signature">
@@ -304,8 +296,7 @@ lo vedrà quando visualizzerà i tuoi dati di contatto.</p>
<p><strong>Silenzia chat</strong> se non vuoi ricevere notifiche da queste. Le chat silenziate restano al loro posto e puoi anche fissare una chat silenziata.</p>
</li>
<li>
<p><strong>Archivia chats</strong> se non vuoi più vederle nel tuo elenco chat.
Le chat archiviate rimangono accessibili sopra l’elenco delle chat o tramite la ricerca.</p>
<p><strong>Archivia chats</strong> se non vuoi più vederle nel tuo elenco chat. Le chat archiviate rimangono accessibili sopra l’elenco delle chat o tramite la ricerca.</p>
</li>
<li>
<p>Quando una chat archiviata riceve un nuovo messaggio, a meno che non sia silenziata, <strong>salterà fuori dall’archivio</strong> e tornerà nell’elenco delle chat.
@@ -377,23 +368,19 @@ e anche gli altri non sempre vedranno che sei “online”.</p>
<ul>
<li>
<p><strong>Un segno di spunta</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
significa che il messaggio è stato inviato correttamente al tuo fornitore.</p>
<p><strong>Una spunta</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
significa che il messaggio è stato inviato correttamente al <a href="#relays">ripetitore</a>.</p>
</li>
<li>
<p><strong>Due spunte</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
significa che almeno il dispositivo di un destinatario
ha segnalato di aver ricevuto il messaggio.</p>
</li>
<li>
<p>I destinatari potrebbero aver disattivato le conferme di lettura,
quindi anche se vedi solo un segno di spunta, il messaggio potrebbe essere stato letto.</p>
</li>
<li>
<p>Al contrario, due spunte non significano automaticamente
che un essere umano abbia letto o compreso il messaggio ;)</p>
<p><strong>Due spunte</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
indica che il tuo contatto ha letto il messaggio.</p>
</li>
</ul>
<p>In <a href="#groups">gruppi</a> il secondo segno di spunta significa che almeno un membro ha segnalato di aver letto il messaggio.</p>
<p>Riceverai la seconda spunta solo se sia tu che uno dei destinatari che hanno letto il messaggio
avete abilitato <strong>Impostazioni → Chat → Conferme di Lettura</strong>.</p>
<h3 id="edit">
@@ -462,14 +449,9 @@ i messaggi (comunque crittografati) potrebbero richiedere più tempo per essere
</h3>
<ul>
<li>Se si desidera risparmiare spazio sul dispositivo, è possibile scegliere di eliminare i vecchi
messaggi automaticamente.</li>
<li>Per attivarla, andare su “Elimina Messaggi dal Dispositivo” nelle impostazioni di “Chat e Media”.
È possibile impostare un intervallo di tempo compreso tra “Dopo 1 ora” e “Dopo 1 anno”;
in questo modo, <em>tutti</em> i messaggi saranno eliminati dal dispositivo non appena saranno
più vecchi di quel periodo.</li>
</ul>
<p>Se si desidera risparmiare spazio sul dispositivo, è possibile scegliere di eliminare i vecchi messaggi automaticamente.</p>
<p>Per attivarla, andare su “Elimina Messaggi dal Dispositivo” nelle impostazioni di “Chat e Media”. È possibile impostare un intervallo di tempo compreso tra “Dopo 1 ora” e “Dopo 1 anno”; in questo modo, <em>tutti</em> i messaggi saranno eliminati dal dispositivo non appena saranno più vecchi di quel periodo.</p>
<h3 id="remove-account">
@@ -517,9 +499,15 @@ ed <a href="#edit">eliminare i propri messaggi</a> dai dispositivi di tutti i me
</h3>
<ul>
<li>Seleziona <strong>Nuova chat</strong> e poi <strong>Nuovo gruppo</strong> dal menu nell’angolo in alto a destra o premi il pulsante corrispondente su Android/iOS.</li>
<li>Nella schermata successiva, seleziona i <strong>membri del gruppo</strong> e definisci un <strong>nome del gruppo</strong>. Puoi anche selezionare un <strong>avatar di gruppo</strong>.</li>
<li>Non appena scrivi il <strong>primo messaggio</strong> nel gruppo, tutti i membri vengono informati del nuovo gruppo e possono rispondere nel gruppo (finché non scrivi un messaggio nel gruppo il gruppo è invisibile ai membri).</li>
<li>
<p>Seleziona <strong>Nuova chat</strong> e poi <strong>Nuovo gruppo</strong> dal menu nell’angolo in alto a destra o premi il pulsante corrispondente su Android/iOS.</p>
</li>
<li>
<p>Nella schermata successiva, seleziona i <strong>membri del gruppo</strong> e definisci un <strong>nome del gruppo</strong>. Puoi anche selezionare un <strong>avatar di gruppo</strong>.</p>
</li>
<li>
<p>Non appena scrivi il <strong>primo messaggio</strong> nel gruppo, tutti i membri vengono informati del nuovo gruppo e possono rispondere nel gruppo (finché non scrivi un messaggio nel gruppo il gruppo è invisibile ai membri).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -530,11 +518,10 @@ ed <a href="#edit">eliminare i propri messaggi</a> dai dispositivi di tutti i me
</h3>
<p>Tutti i membri del gruppo hanno gli <strong>stessi diritti</strong>.
Per questo motivo, tutti possono eliminare qualsiasi membro o aggiungerne di nuovi.</p>
<ul>
<li>
<p>Tutti i membri del gruppo hanno gli <strong>stessi diritti</strong>.
Per questo motivo, tutti possono eliminare qualsiasi membro o aggiungerne di nuovi.</p>
</li>
<li>
<p>Per <strong>aggiungere o eliminare membri</strong>, tocca il nome del gruppo nella chat e seleziona il membro da aggiungere o rimuovere.</p>
</li>
@@ -562,10 +549,8 @@ Tuttavia, poiché i gruppi sono <a href="#groups">destinati a persone fidate</a>
</h3>
<ul>
<li>Poiché non sei più un membro del gruppo, non puoi aggiungerti di nuovo.
Tuttavia, nessun problema, chiedi a qualsiasi altro membro del gruppo in una normale chat di aggiungerti nuovamente.</li>
</ul>
<p>Poiché non sei più un membro del gruppo, non puoi aggiungerti di nuovo.
Tuttavia, nessun problema, chiedi a qualsiasi altro membro del gruppo in una normale chat di aggiungerti nuovamente.</p>
<h3 id="non-desidero-più-ricevere-i-messaggi-di-un-gruppo">
@@ -576,15 +561,12 @@ Tuttavia, nessun problema, chiedi a qualsiasi altro membro del gruppo in una nor
</h3>
<ul>
<li>
<p>Elimina te stesso dall’elenco dei membri o elimina l’intera chat.
Se vuoi unirti di nuovo al gruppo in un secondo momento, chiedi a un altro membro del gruppo di aggiungerti di nuovo.</p>
</li>
<li>
<p>In alternativa, puoi anche “Silenziare” un gruppo - così facendo riceverai tutti i messaggi e
puoi ancora scrivere, ma non viene più notificato alcun nuovo messaggio.</p>
</li>
<li>Elimina te stesso dall’elenco dei membri o elimina l’intera chat.
Se vuoi unirti di nuovo al gruppo in un secondo momento, chiedi a un altro membro del gruppo di aggiungerti di nuovo.</li>
</ul>
<p>In alternativa, puoi anche “Silenziare” un gruppo - così facendo riceverai tutti i messaggi e
puoi ancora scrivere, ma non viene più notificato alcun nuovo messaggio.</p>
<h3 id="clonazione-di-un-gruppo">
@@ -610,6 +592,21 @@ oppure fai clic con il pulsante destro del mouse sul gruppo nell’elenco delle
<p>Il nuovo gruppo è <strong>completamente indipendente</strong> dall’originale,
che continua a funzionare come prima.</p>
<h3 id="quanti-membri-possono-partecipare-a-un-singolo-gruppo">
Quanti membri possono partecipare a un singolo gruppo? <a href="#quanti-membri-possono-partecipare-a-un-singolo-gruppo" class="anchor"></a>
</h3>
<p>Non esiste un limite tecnico preciso,
ma non è consigliabile superare i 150.</p>
<p>Man mano che i gruppi diventano più grandi, possono diventare socialmente instabili e potrebbero aver bisogno di una gerarchia,
dove Delta Chat è un servizio di messaggistica privato per chattare con <a href="#groups">uguali diritti</a>.
Vedi <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">numero di Dunbar</a> per ulteriori approfondimenti.</p>
<h2 id="webxdc">
@@ -897,7 +894,7 @@ Un dispositivo non è necessario perché l’altro funzioni.</p>
<p>Verificare che entrambi i dispositivi siano nella <strong>stessa rete o Wi-Fi</strong>.</p>
</li>
<li>
<p>Su <strong>Windows</strong>, vai su <strong>Pannello di controllo / Rete e Internet</strong>
<p>Su <strong>Windows</strong>, vai su “Pannello di controllo / Rete e Internet”
e assicurati che <strong>Rete Privata</strong> sia selezionata come “Tipo di profilo di rete”
(dopo il trasferimento è possibile ripristinare il valore originale)</p>
</li>
@@ -987,10 +984,10 @@ o l’AppImage per Linux. Le trovi su
</h2>
<h3 id="funzionalità-sperimentali">
<h3 id="experiments">
Funzionalità Sperimentali <a href="#funzionalità-sperimentali" class="anchor"></a>
Funzionalità Sperimentali <a href="#experiments" class="anchor"></a>
</h3>
@@ -1147,9 +1144,7 @@ statistiche settimanali verranno inviate automaticamente a un bot.</p>
</h3>
<ul>
<li>Vedi <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standard usati in Delta Chat</a>.</li>
</ul>
<p>Vedi <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standard usati in Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1178,6 +1173,10 @@ per scambiare informazioni sulla configurazione della crittografia tramite la sc
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> viene utilizzato per stabilire
automaticamente la crittografia end-to-end tra i contatti e tutti i membri di una chat di gruppo.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, la cui piena implementazione è prevista per il 2026,
introdurrà una crittografia post-quantistica resistente e una segretezza avanzata.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Condivisione di un contatto con una
@@ -1386,6 +1385,32 @@ con la consapevolezza che tutti i loro dati, insieme a tutti i metadati, verrann
Inoltre, se un dispositivo viene sequestrato, i contatti di chat che utilizzano profili di breve durata
non possono essere identificati facilmente.</p>
<h3 id="chi-vede-il-mio-indirizzo-ip">
Chi vede il mio Indirizzo IP? <a href="#chi-vede-il-mio-indirizzo-ip" class="anchor"></a>
</h3>
<p>Il <a href="#relays">ripetitore</a> utilizzato deve conoscere il tuo indirizzo IP,
e talvolta anche i dispositivi dei tuoi contatti se avete una <a href="#experiments">chiamata</a>
o utilizzate <a href="#webxdc">apps</a> insieme.</p>
<p>Gli indirizzi IP sono necessari per la connettività e l’efficienza.
Non sono né persistenti né esposti.
Si noti che l’indirizzo IP
non è come un indirizzo dettagliato che si fornisce a un servizio di consegna,
ma molto più generico, che spesso definisce solo la regione o il paese.</p>
<p>Poiché questo è il modo in cui Internet e altri servizi di messaggistica funzionano di default,
non offriamo opzioni né poniamo domande in anticipo.</p>
<p>Se ritieni che il tuo indirizzo IP rappresenti un rischio per la sicurezza o la privacy,
ti consigliamo di utilizzare una VPN, in combinazione con la modalità di blocco del sistema.
Esplorare le opzioni in tutte le app del tuo sistema lascerà delle lacune.
Ad esempio, cliccare su un link espone gli indirizzi IP a sconosciuti e rappresenta il rischio di gran lunga maggiore.</p>
<h3 id="sealedsender">
@@ -1415,7 +1440,7 @@ ma un’implementazione non è stata ancora concordata come priorità.</p>
</h3>
<p>No, non ancora.</p>
<p>Non ancora, ma arriverà con <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat al momento non supporta la tecnologia Perfect Forward Secrecy (PFS).
Ciò significa che se la tua chiave di decrittazione privata viene divulgata
@@ -1426,12 +1451,9 @@ In caso contrario, chi ottiene le tue chiavi di decrittazione
in genere è in grado di ottenere anche tutti i tuoi messaggi non eliminati
e non ha nemmeno bisogno di decifrare i messaggi raccolti in precedenza.</p>
<p>Abbiamo progettato un approccio Forward Secrecy che ha superato
l’esame iniziale di alcuni crittografi ed esperti di implementazione
ma è in attesa di una stesura più formale
per accertarne l’affidabilità nella messaggistica federata e nell’utilizzo su più dispositivi,
prima di poter essere implementato in <a href="https://github.com/chatmail/core">chatmail core</a>,
che lo renderebbe disponibile in tutti i <a href="https://chatmail.at/clients">clients di chatmail</a>.</p>
<p><a href="https://autocrypt2.org">autocrypt v2</a>, la cui piena implementazione è prevista per il 2026,
garantirà un’eliminazione affidabile (segretezza in avanti) tramite rotazione automatica delle chiavi.
Questo approccio è specificato nella bozza dei <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">certificati OpenPGP di Autocrypt v2</a>.</p>
<h3 id="pqc">
@@ -1441,12 +1463,13 @@ che lo renderebbe disponibile in tutti i <a href="https://chatmail.at/clients">c
</h3>
<p>No, non ancora.</p>
<p>Non ancora, ma arriverà con <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat utilizza la libreria Rust OpenPGP <a href="https://github.com/rpgp/rpgp">rPGP</a>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, la cui piena implementazione è prevista per il 2026,
offrirà una crittografia post-quantistica resistente per proteggere dagli attacchi ai computer quantistici.
Delta Chat utilizza la libreria Rust OpenPGP <a href="https://github.com/rpgp/rpgp">rPGP</a>
che supporta l’ultima <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">bozza IETF Post-Quantum-Cryptography OpenPGP</a>.
Il nostro obiettivo è aggiungere il supporto PQC nel <a href="https://github.com/chatmail/core">core di chatmail</a> dopo che la bozza sarà stata finalizzata dall’IETF
in collaborazione con altri implementatori di OpenPGP.</p>
L’implementazione è specificata nella bozza dei <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Certificati OpenPGP Autocrypt v2</a>.</p>
<h3 id="come-posso-controllare-manualmente-le-informazioni-di-crittografia">
@@ -1626,10 +1649,21 @@ ordinate cronologicamente:</p>
<ul>
<li>
<p>Il progetto UE <a href="https://nextleap.eu">NEXTLEAP</a> ha finanziato la ricerca
e implementazione di gruppi verificati e impostazione di protocolli di contatto
nel 2017 e nel 2018 e ha anche contribuito a integrare la crittografia end-to-end
tramite <a href="https://autocrypt.org">Autocrypt</a>.</p>
<p>Nel 2023 e nel 2024 siamo stati accettati nel programma Next Generation Internet (NGI)
per il nostro lavoro in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
insieme ai partner di collaborazione che lavorano su
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> e
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
Tutti questi progetti sono parzialmente completati o saranno completati all’inizio del 2025.</p>
</li>
<li>
<p>Nel 2021 abbiamo ricevuto ulteriori finanziamenti dall’UE per due proposte di Next-Generation-Internet, ovvero per <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - directory di portabilità dei provider di posta elettronica</a> (~97.000 EUR) e <a href="https://nlnet.nl/project/EmailPorting/">AEAP - portabilità degli indirizzi email</a> (~90.000 EUR), che hanno portato a un migliore supporto multi-profilo, a un miglioramento delle impostazioni di contatto e di gruppo tramite codice QR e a numerosi miglioramenti di rete su tutte le piattaforme.</p>
</li>
<li>
<p>La <a href="https://nlnet.nl/">fondazione NLnet</a> ha concesso nel 2019/2020 46.000 EUR per
completando i collegamenti Rust/Python e avviando un ecosistema Chat-bot.</p>
</li>
<li>
<p>L’<a href="https://opentechfund.org">Open Technology Fund</a> ci ha dato una
@@ -1642,33 +1676,10 @@ rilasciare nelle versioni Delta/iOS, per convertire la nostra libreria principal
per fornire nuove funzionalità per tutte le piattaforme.</p>
</li>
<li>
<p>La <a href="https://nlnet.nl/">fondazione NLnet</a> ha concesso nel 2019/2020 46.000 EUR per
completando i collegamenti Rust/Python e avviando un ecosistema Chat-bot.</p>
</li>
<li>
<p>Nel 2021 abbiamo ricevuto ulteriori finanziamenti dall’UE per due proposte di Next-Generation-Internet, ovvero per <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - directory di portabilità dei provider di posta elettronica</a> (~97.000 EUR) e <a href="https://nlnet.nl/project/EmailPorting/">AEAP - portabilità degli indirizzi email</a> (~90.000 EUR), che hanno portato a un migliore supporto multi-profilo, a un miglioramento delle impostazioni di contatto e di gruppo tramite codice QR e a numerosi miglioramenti di rete su tutte le piattaforme.</p>
</li>
<li>
<p>Da fine 2021 a marzo 2023 abbiamo ricevuto un finanziamento <em>Internet Freedom</em> (500.000 USD) dall’Ufficio per la Democrazia, i Diritti Umani e il Lavoro (DRL) degli Stati Uniti.
Questo finanziamento ha supportato i nostri obiettivi a lungo termine: rendere Delta Chat più utilizzabile
e compatibile con un’ampia gamma di server email in tutto il mondo, e più resiliente e sicura
in luoghi spesso colpiti da censura e blocchi di Internet.</p>
</li>
<li>
<p>2023-2024 abbiamo completato con successo il progetto <a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Chatmail Sicuro</a> finanziato da OTF,
consentendoci di introdurre la crittografia garantita,
creando una <a href="https://delta.chat/chatmail">rete di server di chatmail</a>
e fornendo “inserimento immediato” in tutte le app rilasciate da aprile 2024 in poi.</p>
</li>
<li>
<p>Nel 2023 e nel 2024 siamo stati accettati nel programma Next Generation Internet (NGI)
per il nostro lavoro in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
insieme ai partner di collaborazione che lavorano su
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> e
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
Tutti questi progetti sono parzialmente completati o saranno completati all’inizio del 2025.</p>
<p>Il progetto UE <a href="https://nextleap.eu">NEXTLEAP</a> ha finanziato la ricerca
e implementazione di gruppi verificati e impostazione di protocolli di contatto
nel 2017 e nel 2018 e ha anche contribuito a integrare la crittografia end-to-end
tramite <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>A volte riceviamo donazioni una tantum da privati.
+128 -118
View File
@@ -26,6 +26,7 @@
<li><a href="#ik-heb-mezelf-per-ongeluk-verwijderd">Ik heb mezelf per ongeluk verwijderd</a></li>
<li><a href="#ik-wil-geen-groepsberichten-meer-ontvangen">Ik wil geen groepsberichten meer ontvangen</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">How does Delta Chat protect metadata in messages?</a></li>
<li><a href="#device-seizure">How to protect metadata and contacts when a device is seized?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>Om de prestaties te verhogen, worden afbeeldingen standaard geoptimaliseerd en verkleind verstuurd, maar je kunt ze als een bestand verzenden om het origineel te sturen.</p>
</li>
</ul>
<p>Om de prestaties te verhogen, worden afbeeldingen standaard geoptimaliseerd en verkleind verstuurd, maar je kunt ze als een bestand verzenden om het origineel te sturen.</p>
<h3 id="multiple-accounts">
@@ -262,16 +260,11 @@ or to <strong>Switch Profiles</strong>.</p>
</h3>
<ul>
<li>
<p>In de instellingen kun je een profielfoto toevoegen. Als je een bericht stuurt aan
je contactpersonen of ze toevoegt middels hun QR-code, dan krijgen ze je profielfoto te zien.</p>
</li>
<li>
<p>Omwille van je privacy, krijgen anderen je profielfoto pas te zien
als je ze een bericht stuurt.</p>
</li>
</ul>
<p>In de instellingen kun je een profielfoto toevoegen. Als je een bericht stuurt aan
je contactpersonen of ze toevoegt middels hun QR-code, dan krijgen ze je profielfoto te zien.</p>
<p>Omwille van je privacy, krijgen anderen je profielfoto pas te zien
als je ze een bericht stuurt.</p>
<h3 id="signature">
@@ -304,8 +297,7 @@ they will see it when they view your contact details.</p>
<p>Stel gesprekken in op <strong>Negeren</strong> als je geen meldingen meer wilt ontvangen. Wel blijven genegeerde gesprekken op de lijst staan en kun je ze te allen tijde vastmaken.</p>
</li>
<li>
<p><strong>Archiveer gesprekken</strong> als je ze niet meer op de gesprekslijst wilt zien.
Gearchiveerde gesprekken zijn te allen tijde te bekijken boven de lijst of via een zoekopdracht.</p>
<p><strong>Archiveer gesprekken</strong> als je ze niet meer op de gesprekslijst wilt zien. Gearchiveerde gesprekken zijn te allen tijde te bekijken boven de lijst of via een zoekopdracht.</p>
</li>
<li>
<p>Als er een nieuw bericht in een gearchiveerd gesprek wordt ontvangen, dan wordt het gesprek in kwestie <strong>ge-dearchiveerd</strong> en dus weer op de gesprekslijst geplaatst.
@@ -341,7 +333,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -378,22 +370,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -463,12 +451,9 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>Als je ruimte wilt besparen op je apparaat, dan kun je er voor kiezen om oude
berichten automatisch te verwijderen.</li>
<li>Inschakelen kan via de sectie ‘Gesprekken en media’ in de instellingen. Je kunt een periode tussen
‘na één uur’ en ‘na één jaar’ kiezen. *Alle berichten die ouder zijn, worden verwijderd.</li>
</ul>
<p>Als je ruimte wilt besparen op je apparaat, dan kun je er voor kiezen om oude berichten automatisch te verwijderen.</p>
<p>Inschakelen kan via de sectie ‘Gesprekken en media’ in de instellingen. Je kunt een periode tussen ‘na één uur’ en ‘na één jaar’ kiezen. <em>Alle</em> berichten die ouder zijn, worden verwijderd.</p>
<h3 id="remove-account">
@@ -516,9 +501,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Open het ‘menu met de drie puntjes’ rechtsboven in het gespreksoverzicht, kies <strong>Nieuw gesprek</strong> en daarna <strong>Nieuwe groep</strong>.</li>
<li>Kies dan de <strong>groepsleden</strong> en druk op het vinkje rechtsboven. Daarna kun je een <strong>groepsnaam</strong> opgeven.</li>
<li>Zodra je het <strong>eerste groepsbericht</strong> hebt verstuurd, worden alle deelnemers op de hoogte gebracht en kunnen zij antwoorden versturen (de groep blijft onzichtbaar voor anderen zolang jij geen bericht verstuurt).</li>
<li>
<p>Open het ‘menu met de drie puntjes’ rechtsboven in het gespreksoverzicht, kies <strong>Nieuw gesprek</strong> en daarna <strong>Nieuwe groep</strong>.</p>
</li>
<li>
<p>Kies dan de <strong>groepsleden</strong> en druk op het vinkje rechtsboven. Daarna kun je een <strong>groepsnaam</strong> opgeven.</p>
</li>
<li>
<p>Zodra je het <strong>eerste groepsbericht</strong> hebt verstuurd, worden alle deelnemers op de hoogte gebracht en kunnen zij antwoorden versturen (de groep blijft onzichtbaar voor anderen zolang jij geen bericht verstuurt).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -529,11 +520,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -561,10 +551,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Je neemt geen deel meer aan de groep en kunt jezelf dus niet meer toevoegen.
Vraag iemand via een één-op-ééngesprek of hij/zij je weer wilt toevoegen.</li>
</ul>
<p>Je neemt geen deel meer aan de groep en kunt jezelf dus niet meer toevoegen.
Vraag iemand via een één-op-ééngesprek of hij/zij je weer wilt toevoegen.</p>
<h3 id="ik-wil-geen-groepsberichten-meer-ontvangen">
@@ -575,15 +563,12 @@ Vraag iemand via een één-op-ééngesprek of hij/zij je weer wilt toevoegen.</l
</h3>
<ul>
<li>
<p>Verwijder jezelf van de groepslijst of verwijder het hele groepsgesprek.
Als je later weer wilt deelnemen, vraag dan iemand anders of hij/zij je weer wilt toevoegen.</p>
</li>
<li>
<p>Wat ook kan doen is groepsmeldingen uitschakelen. Zo blijf je in de groep, maar ontvang je
geen meldingen meer als er nieuwe berichten zijn.</p>
</li>
<li>Verwijder jezelf van de groepslijst of verwijder het hele groepsgesprek.
Als je later weer wilt deelnemen, vraag dan iemand anders of hij/zij je weer wilt toevoegen.</li>
</ul>
<p>Wat ook kan doen is groepsmeldingen uitschakelen. Zo blijf je in de groep, maar ontvang je
geen meldingen meer als er nieuwe berichten zijn.</p>
<h3 id="cloning-a-group">
@@ -609,6 +594,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -896,7 +896,7 @@ op beide apparaten</strong>. Hierdoor hoef je niet het ene apparaat bij de hand
<p>Controleer of beide apparaten verbonden zijn met <strong>hetzelfde (wifi)netwerk</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -991,10 +991,10 @@ of de AppImage van de Linux-client. Deze kun je downloaden op
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1030,7 +1030,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1153,9 +1153,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Bekijk de pagina <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Door Delta Chat gebruikte standaarden</a>.</li>
</ul>
<p>Bekijk de pagina <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Door Delta Chat gebruikte standaarden</a>.</p>
<h2 id="e2ee">
@@ -1184,6 +1182,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1368,12 +1370,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1394,6 +1394,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1423,7 +1449,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1434,12 +1460,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1449,12 +1472,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1633,52 +1657,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p><a href="https://opentechfund.org">Open Technology Fund</a> heeft twee subsidies toegekend.
De eerste subsidie, voor 2018/2019, ter waarde van ong. $200,000, heeft enorm geholpen om de Android-app
te verbeteren en een bètaversie van de computerclient vrij te geven.
Verder hebben we onderzoek kunnen doen naar het uiterlijk in relatie tot mensenrechten -
bekijk onze conclusie hier: <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
De tweede subsidie, voor 2019/2020, ter waarde van ong. $300,000, loopt nog en ondersteunt ons bij het
vrijgeven van de iOS-client, het overzetten van de code van de kernbibliotheek naar Rust en
het implementeren van nieuwe functies op alle platformen.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Soms ontvangen we eenmalige donaties van privépersonen, waar we
+111 -88
View File
@@ -26,6 +26,7 @@
<li><a href="#usunąłem-się-przez-przypadek">Usunąłem się przez przypadek.</a></li>
<li><a href="#nie-chcę-już-otrzymywać-wiadomości-od-grupy">Nie chcę już otrzymywać wiadomości od grupy.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#zaawansowane">Zaawansowane</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Czy wiadomości oznaczone ikoną poczty są widoczne w internecie?</a></li>
<li><a href="#message-metadata">W jaki sposób Delta Chat chroni metadane w wiadomościach?</a></li>
<li><a href="#device-seizure">Jak chronić metadane i kontakty w przypadku przejęcia urządzenia?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Czy Delta Chat obsługuje funkcję „Sealed Sender”?</a></li>
<li><a href="#pfs">Czy Delta Chat obsługuje funkcję Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Czy Delta Chat obsługuje kryptografię postkwantową?</a></li>
@@ -103,8 +105,7 @@
</h2>
<p>Delta Chat is a reliable, decentralized and secure instant messaging app,
available for mobile and desktop platforms.</p>
<p>Delta Chat to niezawodna, zdecentralizowana i bezpieczna aplikacja do błyskawicznego przesyłania wiadomości, dostępna na platformy mobilne i stacjonarne.</p>
<ul>
<li>
@@ -185,7 +186,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -221,15 +223,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Tak. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Tak. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>Ze względu na wydajność obrazy są domyślnie optymalizowane i wysyłane w mniejszym rozmiarze, ale można je wysłać jako „plik”, aby zachować oryginał.</p>
</li>
</ul>
<p>Ze względu na wydajność obrazy są domyślnie optymalizowane i wysyłane w mniejszym rozmiarze, ale można je wysłać jako „plik”, aby zachować oryginał.</p>
<h3 id="multiple-accounts">
@@ -259,14 +256,9 @@ and uses the server only to relay messages.</p>
</h3>
<ul>
<li>
<p>Możesz dodać zdjęcie profilowe w swoich ustawieniach. Jeśli napiszesz do swoich kontaktów lub dodasz je za pomocą kodu QR, automatycznie zobaczą je jako Twoje zdjęcie profilowe.</p>
</li>
<li>
<p>Ze względów prywatności nikt nie widzi Twojego zdjęcia profilowego, dopóki nie napiszesz do niego wiadomości.</p>
</li>
</ul>
<p>Możesz dodać zdjęcie profilowe w swoich ustawieniach. Jeśli napiszesz do swoich kontaktów lub dodasz je za pomocą kodu QR, automatycznie zobaczą je jako Twoje zdjęcie profilowe.</p>
<p>Ze względów prywatności nikt nie widzi Twojego zdjęcia profilowego, dopóki nie napiszesz do niego wiadomości.</p>
<h3 id="signature">
@@ -366,22 +358,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -438,10 +426,9 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>Jeśli chcesz zaoszczędzić miejsce na urządzeniu, możesz wybrać opcję automatycznego usuwania starych wiadomości.</li>
<li>Aby ją włączyć, przejdź do „Usuń wiadomości z urządzenia” w ustawieniach w sekcji „Czaty i media”. Możesz ustawić przedział czasowy pomiędzy „po 1 godzinie” a „po 1 roku”; w ten sposób <em>wszystkie</em> wiadomości zostaną usunięte z urządzenia, gdy tylko staną się starsze.</li>
</ul>
<p>Jeśli chcesz zaoszczędzić miejsce na urządzeniu, możesz wybrać opcję automatycznego usuwania starych wiadomości.</p>
<p>Aby ją włączyć, przejdź do „Usuń wiadomości z urządzenia” w ustawieniach w sekcji „Czaty i media”. Możesz ustawić przedział czasowy pomiędzy „po 1 godzinie” a „po 1 roku”; w ten sposób <em>wszystkie</em> wiadomości zostaną usunięte z urządzenia, gdy tylko staną się starsze.</p>
<h3 id="remove-account">
@@ -489,9 +476,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Wybierz <strong>Nowy czat</strong>, a następnie <strong>Nowa grupa</strong> z menu w prawym górnym rogu lub naciśnij odpowiedni przycisk na Androidzie / iOS.</li>
<li>Na następnym ekranie wybierz <strong>członków grupy</strong> i zdefiniuj <strong>nazwę grupy</strong>. Możesz też wybrać awatar <strong>grupy</strong>.</li>
<li>Zaraz po napisaniu pierwszej wiadomości w grupie wszyscy członkowie zostaną poinformowani o nowej grupie i mogą odpowiedzieć w grupie (jeżeli nie napiszesz wiadomości w grupie, grupa jest niewidoczna dla członków).</li>
<li>
<p>Wybierz <strong>Nowy czat</strong>, a następnie <strong>Nowa grupa</strong> z menu w prawym górnym rogu lub naciśnij odpowiedni przycisk na Androidzie / iOS.</p>
</li>
<li>
<p>Na następnym ekranie wybierz <strong>członków grupy</strong> i zdefiniuj <strong>nazwę grupy</strong>. Możesz też wybrać awatar <strong>grupy</strong>.</p>
</li>
<li>
<p>Zaraz po napisaniu pierwszej wiadomości w grupie wszyscy członkowie zostaną poinformowani o nowej grupie i mogą odpowiedzieć w grupie (jeżeli nie napiszesz wiadomości w grupie, grupa jest niewidoczna dla członków).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -502,11 +495,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -534,10 +526,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Ponieważ nie jesteś członkiem grupy, nie możesz dodać siebie ponownie.
Jednak nie ma problemu, po prostu poproś dowolnego członka grupy na normalnym czacie, aby dodał cię ponownie.</li>
</ul>
<p>Ponieważ nie jesteś członkiem grupy, nie możesz dodać siebie ponownie.
Jednak nie ma problemu, po prostu poproś dowolnego członka grupy na normalnym czacie, aby dodał cię ponownie.</p>
<h3 id="nie-chcę-już-otrzymywać-wiadomości-od-grupy">
@@ -548,15 +538,12 @@ Jednak nie ma problemu, po prostu poproś dowolnego członka grupy na normalnym
</h3>
<ul>
<li>
<p>Usuń siebie z listy członków lub usuń cały czat.
Jeśli później będziesz chciał ponownie dołączyć do grupy, poproś innego członka grupy, aby dodał cię do grupy.</p>
</li>
<li>
<p>Alternatywnie możesz też „Wyłączyć powiadomienia” dla grupy dzięki temu otrzymasz wszystkie wiadomości i
nadal będziesz mógł pisać, ale nie będziesz już powiadamiany o żadnych nowych wiadomościach.</p>
</li>
<li>Usuń siebie z listy członków lub usuń cały czat.
Jeśli później będziesz chciał ponownie dołączyć do grupy, poproś innego członka grupy, aby dodał cię do grupy.</li>
</ul>
<p>Alternatywnie możesz też „Wyłączyć powiadomienia” dla grupy dzięki temu otrzymasz wszystkie wiadomości i
nadal będziesz mógł pisać, ale nie będziesz już powiadamiany o żadnych nowych wiadomościach.</p>
<h3 id="cloning-a-group">
@@ -582,6 +569,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -834,7 +836,7 @@ Welcome to the power of the interoperable chatmail relay network :)</p>
<p>Sprawdź dokładnie, czy oba urządzenia są w tym <strong>samym Wi-Fi lub tej samej sieci</strong></p>
</li>
<li>
<p>Na <strong>Windowsie</strong>, przejdź do <strong>Panel sterowania / Sieć i internet</strong> i upewnij się, że <strong>Sieć prywatna</strong> jest wybrana jako “Typ profilu sieci”
<p>Na <strong>Windowsie</strong>, przejdź do “Panel sterowania / Sieć i internet” i upewnij się, że <strong>Sieć prywatna</strong> jest wybrana jako “Typ profilu sieci”
(po przeniesieniu możesz wrócić do pierwotnej wartości)</p>
</li>
<li>
@@ -911,10 +913,10 @@ Jeśli korzystasz z iOS i napotykasz trudności, może <a href="https://support.
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -950,7 +952,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1073,9 +1075,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Zobacz <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standardy używane w Delta Chat</a>.</li>
</ul>
<p>Zobacz <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standardy używane w Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1102,6 +1102,10 @@ weekly statistics will be automatically sent to a bot.</p>
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> służy do automatycznego ustanawiania szyfrowania typu end-to-end między kontaktami a wszystkimi członkami czatu grupowego.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Udostępnienie kontaktu na czacie</a> umożliwia odbiorcom korzystanie z szyfrowania typu end-to-end z tym kontaktem.</p>
</li>
@@ -1236,12 +1240,10 @@ even if the message was not end-to-end encrypted.</p>
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>Wszystkie pozostałe metadane dotyczące wiadomości, kontaktów i grup znajdują się w zaszyfrowanej metodą end-to-end części wiadomości.</p>
<h3 id="device-seizure">
@@ -1262,6 +1264,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1288,11 +1316,13 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>Nie, jeszcze nie.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat obecnie nie obsługuje mechanizmu Perfect Forward Secrecy (PFS). Oznacza to, że jeśli twój prywatny klucz deszyfrujący zostanie ujawniony, a ktoś zdobędzie twoje wcześniejsze wiadomości w trakcie transmisji, będzie mógł je odszyfrować i odczytać za pomocą ujawnionego klucza deszyfrującego. Należy pamiętać, że mechanizm Forward Secrecy zwiększa bezpieczeństwo tylko w przypadku usuwania wiadomości. W przeciwnym razie osoba, która uzyska twoje klucze deszyfrujące, zazwyczaj będzie mogła uzyskać dostęp do wszystkich nieusuniętych wiadomości i nie będzie musiała odszyfrowywać żadnych wcześniej zebranych wiadomości.</p>
<p>Opracowaliśmy metodę Forward Secrecy, która przeszła wstępną analizę niektórych kryptografów i ekspertów ds. wdrożeń, ale oczekuje na bardziej formalne opracowanie, które potwierdzi jej niezawodne działanie w federacyjnym przesyłaniu wiadomości i w przypadku korzystania z wielu urządzeń, zanim zostanie zaimplementowana w <a href="https://github.com/chatmail/core">rdzeniu chatmail</a>, co uczyniłoby ją dostępną we wszystkich <a href="https://chatmail.at/clients">klientach chatmail</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1302,9 +1332,13 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>Nie, jeszcze nie.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat korzysta z biblioteki Rust OpenPGP <a href="https://github.com/rpgp/rpgp">rPGP</a>, która obsługuje najnowszy <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">projekt OpenPGP IETF Post-Quantum-Cryptography</a>. Planujemy dodać obsługę PQC do <a href="https://github.com/chatmail/core">rdzenia chatmail</a> po sfinalizowaniu projektu w IETF we współpracy z innymi implementatorami OpenPGP.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="jak-mogę-ręcznie-sprawdzić-informacje-o-szyfrowaniu">
@@ -1437,31 +1471,20 @@ Raczej korzystamy z publicznych źródeł finansowania, jak dotąd pochodzących
<ul>
<li>
<p>Unijny projekt <a href="https://nextleap.eu">NEXTLEAP</a> sfinansował badania i wdrożenie zweryfikowanych grup i ustawień protokołów kontaktowych w latach 2017 i 2018, a także pomógł zintegrować szyfrowanie end-to-end poprzez <a href="https://autocrypt.org">Autocrypt</a>.</p>
<p>W latach 2023 i 2024 zostaliśmy przyjęci do programu Next Generation Internet (NGI) za naszą pracę w <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>, wraz z partnerami współpracującymi pracującymi nad <a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>, <a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>, <a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> i <a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>. Wszystkie te projekty są częściowo ukończone lub zostaną ukończone na początku 2025 r.</p>
</li>
<li>
<p>W 2021 r. otrzymaliśmy kolejne dofinansowanie z UE na dwie propozycje dotyczące Internetu nowej generacji, a mianowicie na <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD – katalog przenośności dostawcy poczty e-mail</a> ( ~97 tys. EUR) i <a href="https://nlnet.nl/project/EmailPorting/">AEAP – przenoszenie adresu e-mail</a> (~90 tys. EUR), co zaowocowało lepszą obsługą wielu kont, ulepszonymi kontaktami i ustawieniami grup za pomocą kodów QR oraz wieloma ulepszeniami sieciowymi na wszystkich platformach.</p>
</li>
<li>
<p><a href="https://nlnet.nl/">Fundacja NLnet</a> przekazała w latach 2019/2020 kwotę 46 tys. EUR na wykonanie wiązań Rust/Python i uruchomienie ekosystemu Chat-bot.</p>
</li>
<li>
<p><a href="https://opentechfund.org">Open Technology Fund</a> przyznał nam pierwszy grant w 2018/2019 (~200 000 $), dzięki któremu znacznie ulepszyliśmy aplikację na Androida i wydaliśmy pierwszą wersję beta aplikacji na komputery stacjonarne, a także ugruntował rozwój naszych funkcji w badaniach UX w kontekście praw człowieka, zobacz nasz końcowy raport <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX</a>.
Druga dotacja w 2019/2020 (~300 000 4) pomogła nam wydać wersje Delta/iOS, przekonwertować naszą podstawową bibliotekę na Rust i zapewnić nowe funkcje dla wszystkich platform.</p>
</li>
<li>
<p><a href="https://nlnet.nl/">Fundacja NLnet</a> przekazała w latach 2019/2020 kwotę 46 tys. EUR na wykonanie wiązań Rust/Python i uruchomienie ekosystemu Chat-bot.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
</li>
<li>
<p>W latach 2023-2024 pomyślnie ukończyliśmy finansowany przez OTF <a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">projekt Secure Chatmail</a>, co pozwoliło nam wprowadzić gwarantowane szyfrowanie, stworzyć <a href="https://delta.chat/chatmail">sieć serwerów chatmail</a> i zapewnić „natychmiastowe wdrażanie” we wszystkich aplikacjach wydanych od kwietnia 2024 r.</p>
</li>
<li>
<p>W latach 2023 i 2024 zostaliśmy przyjęci do programu Next Generation Internet (NGI) za naszą pracę w <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>, wraz z partnerami współpracującymi pracującymi nad <a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>, <a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>, <a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> i <a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>. Wszystkie te projekty są częściowo ukończone lub zostaną ukończone na początku 2025 r.</p>
<p>Unijny projekt <a href="https://nextleap.eu">NEXTLEAP</a> sfinansował badania i wdrożenie zweryfikowanych grup i ustawień protokołów kontaktowych w latach 2017 i 2018, a także pomógł zintegrować szyfrowanie end-to-end poprzez <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Czasami otrzymujemy jednorazowe darowizny od osób prywatnych. Na przykład w 2021 roku pewna hojna osoba przekazała nam 4K EUR w formie przelewu bankowego tytułem “kontynuujcie dobry rozwój!”. 💜 Takie pieniądze przeznaczamy na finansowanie spotkań rozwojowych lub na doraźne wydatki, których nie da się łatwo przewidzieć lub zrefundować z publicznych dotacji. Otrzymywanie większej ilości darowizn pomaga nam również stać się bardziej niezależnymi i długoterminowo rentownymi jako społeczność współpracowników.</p>
File diff suppressed because it is too large Load Diff
+134 -116
View File
@@ -15,7 +15,7 @@
<li><a href="#что-означают-галочки-рядом-с-исходящими-сообщениями">Что означают галочки рядом с исходящими сообщениями?</a></li>
<li><a href="#edit">Исправление опечаток и удаление сообщений после отправки</a></li>
<li><a href="#ephemeralmsgs">Как работают исчезающие сообщения?</a></li>
<li><a href="#delold">Что произойдет, если я включу функцию “Удалять старые сообщения с устройства”?</a></li>
<li><a href="#delold">Что произойдет, если я включу функцию “Удалять сообщения с устройства”?</a></li>
<li><a href="#remove-account">Как удалить свой профиль в чате?</a></li>
</ul>
</li>
@@ -26,6 +26,7 @@
<li><a href="#я-случайно-удалил-самого-себя">Я случайно удалил самого себя.</a></li>
<li><a href="#я-больше-не-хочу-получать-сообщения-группы">Я больше не хочу получать сообщения группы.</a></li>
<li><a href="#клонирование-группы">Клонирование группы</a></li>
<li><a href="#сколько-участников-может-быть-в-одной-группе">Сколько участников может быть в одной группе?</a></li>
</ul>
</li>
<li><a href="#webxdc">Встроенные приложения чата</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#расширенные">Расширенные</a>
<ul>
<li><a href="#экспериментальные-функции">Экспериментальные функции</a></li>
<li><a href="#experiments">Экспериментальные функции</a></li>
<li><a href="#relays">Что такое релеи chatmail?</a></li>
<li><a href="#могу-ли-я-использовать-обычный-адрес-электронной-почты-с-delta-chat">Могу ли я использовать обычный адрес электронной почты с Delta Chat?</a></li>
<li><a href="#classic-email">Как настроить профиль чата с использованием классического адреса электронной почты в качестве релея?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Видны ли в Интернете сообщения, отмеченные значком почты?</a></li>
<li><a href="#message-metadata">Как Delta Chat защищает метаданные в сообщениях?</a></li>
<li><a href="#device-seizure">Как защитить метаданные и контакты при изъятии устройства?</a></li>
<li><a href="#кто-видит-мой-ip-адрес">Кто видит мой IP-адрес?</a></li>
<li><a href="#sealedsender">Поддерживает ли Delta Chat функцию “Sealed Sender” (Засекреченный отправитель)?</a></li>
<li><a href="#pfs">Поддерживает ли Delta Chat свойство Perfect forward secrecy, PFS (Совершенную прямую секретность)?</a></li>
<li><a href="#pqc">Поддерживает ли Delta Chat Post-Quantum-Cryptography (Постквантовую криптографию)?</a></li>
@@ -185,7 +187,8 @@
<p>Поскольку это приватный мессенджер,
писать вам могут только друзья и члены семьи, с которыми вы <a href="#howtoe2ee">поделились QR-кодом или ссылкой-приглашением.</a></p>
<p>Ваши друзья могут поделиться вашим контактом с другими друзьями, это отображается как <strong>запрос</strong>.</p>
<p>Ваши друзья могут поделиться вашим контактом с другими друзьями,
это отображается как <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Запрос</b></p>
<p>— Нужно <strong>принять</strong> запрос, прежде чем ответить.</p>
@@ -219,15 +222,10 @@
</h3>
<ul>
<li>
<p>Да. Изображения, видео, файлы, голосовые сообщения и т.д. можно отправлять с помощью кнопок <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Вложение</strong>
<p>Да. Изображения, видео, файлы, голосовые сообщения и т.д. можно отправлять с помощью кнопок <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Вложение</strong>
или <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Голосовое сообщение</strong>.</p>
</li>
<li>
<p>Для лучшей производительности изображения по умолчанию оптимизируются и отправляются в меньшем размере, но вы можете отправить их как “файл”, чтобы сохранить оригинал.</p>
</li>
</ul>
<p>Для повышения производительности, изображения оптимизируются и отправляются по умолчанию в уменьшенном размере, но вы можете отправить их как “файл”, чтобы сохранить оригинал.</p>
<h3 id="multiple-accounts">
@@ -258,16 +256,11 @@
</h3>
<ul>
<li>
<p>Вы можете добавить изображение профиля в настройках. Если вы пишете своим контактам
<p>Вы можете добавить изображение профиля в настройках. Если вы пишете своим контактам
или добавляете их с помощью QR-кода, они автоматически видят его как изображение вашего профиля.</p>
</li>
<li>
<p>По соображениям конфиденциальности, никто не увидит изображение вашего профиля,
пока вы не напишете им сообщение.</p>
</li>
</ul>
<p>По соображениям конфиденциальности, никто не увидит изображение вашего профиля, пока вы не напишете
им сообщение.</p>
<h3 id="signature">
@@ -301,7 +294,8 @@
</li>
<li>
<p><strong>Отправить в архив</strong> необходимо, если вы не хотите больше видеть их в списке чатов.
Архивные чаты остаются доступными над списком чатов или через поиск.</p>
Архивные чаты остаются доступными над списком чатов или через поиск
и будут отмечены как <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Архивировано</b></p>
</li>
<li>
<p>Когда в чат, находящийся в архиве, приходит новое сообщение, если не включена опция <strong>Отключить уведомления</strong>, он <strong>Возвращается из архива</strong> в ваш список чатов.
@@ -336,7 +330,7 @@
вы можете вернуться к этому сообщению в исходном чате</p>
</li>
<li>
<p>Наконец, вы также можете использовать “Сохраненные сообщения” для создания <strong>личных заметок</strong> - откройте чат, введите что-то, добавьте фото или голосовое сообщение и т.д.</p>
<p>Наконец, вы можете использовать “Сохраненные сообщения”, для создания <strong>личных заметок</strong> - откройте чат, напечатайте что-нибудь, добавьте фото или голосовое сообщение и т.д.</p>
</li>
<li>
<p>Поскольку “Сохраненные сообщения” синхронизируются, они могут стать удобным способом передачи данных между устройствами</p>
@@ -372,22 +366,18 @@
<ul>
<li>
<p><strong>Одна галочка</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
означает, что сообщение было успешно отправлено вашему провайдеру.</p>
означает, что сообщение успешно отправлено на <a href="#relays">релей</a>.</p>
</li>
<li>
<p><strong>Две галочки</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
означают, что по крайней мере одно устройство получателя
сообщило об успешном получении сообщения.</p>
</li>
<li>
<p>Получатели могли отключить подтверждения прочтения,
поэтому даже если вы видите только одну галочку, сообщение могло быть прочитано.</p>
</li>
<li>
<p>И наоборот, две галочки не обязательно означают
что человек прочитал или понял сообщение ;)</p>
указывают на то, что ваш контакт прочитал сообщение.</p>
</li>
</ul>
<p>В <a href="#groups">группах</a> вторая галочка означает, что хотя бы один из участников подтвердил прочтение сообщения.</p>
<p>Вторая галочка появится только в том случае, если у вас и хотя бы одного из получателей, прочитавшего сообщение,
включена опция <strong>Настройки → Чаты → Уведомление о прочтении</strong>.</p>
<h3 id="edit">
@@ -452,18 +442,18 @@
<h3 id="delold">
Что произойдет, если я включу функцию “Удалять старые сообщения с устройства”? <a href="#delold" class="anchor"></a>
Что произойдет, если я включу функцию “Удалять сообщения с устройства”? <a href="#delold" class="anchor"></a>
</h3>
<ul>
<li>Если вы хотите сэкономить место на устройстве, вы можете выбрать
автоматическое удаление старых сообщений.</li>
<li>Чтобы включить эту функцию, перейдите в “Удалять сообщения с устройства” в настройках “Чаты и медиафайлы”
Вы можете установить период от “Через 1 час” до “Через 1 год”;
Таким образом, <em>все</em> сообщения будут удалены с устройства, как только они станут старше выбранного срока.</li>
</ul>
<p>Если вы хотите сэкономить место на устройстве, можно выбрать функцию автоматического удаления старых
сообщений.</p>
<p>Чтобы включить эту функцию, перейдите в <strong>Настройки → Чаты → Удалять сообщения с устройства</strong>.
Вы можете установить временные рамки от “через 1 час” до “через 1 год”;
Таким образом, <em>все</em> сообщения будут удаляться с вашего устройства, как только они станут
старше выбранного срока.</p>
<h3 id="remove-account">
@@ -511,9 +501,15 @@
</h3>
<ul>
<li>Выберите <strong>Новый чат</strong>, а затем <strong>Новая группа</strong> из меню в правом верхнем углу или нажмите соответствующую кнопку на Android/iOS.</li>
<li>На следующем экране выберите <strong>участников</strong> и придумайте <strong>название группы</strong>. Вы также можете выбрать <strong>изображение группы</strong>.</li>
<li>Как только вы напишете <strong>первое сообщение</strong> в группе, все участники будут проинформированы о новой группе и смогут ответить. (Пока вы не напишете сообщение в группе, группа будет невидима для участников).</li>
<li>
<p>Выберите <strong>Новый чат</strong>, а затем <strong>Новая группа</strong> из меню в правом верхнем углу или нажмите соответствующую кнопку на Android/iOS.</p>
</li>
<li>
<p>На следующем экране выберите <strong>участников группы</strong> и придумайте <strong>название группы</strong>. Вы также можете выбрать <strong>аватар группы</strong>.</p>
</li>
<li>
<p>Как только вы напишете <strong>первое сообщение</strong> в группе, все участники будут проинформированы о новой группе и смогут ответить. (Пока вы не напишете сообщение в группе, группа будет невидима для участников).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -524,11 +520,10 @@
</h3>
<p>Все участники группы имеют <strong>одинаковые права</strong>.
Поэтому каждый может удалить любого участника или добавить нового.</p>
<ul>
<li>
<p>У всех участников группы <strong>одинаковые права</strong>.
Поэтому каждый может удалить любого участника или добавить новых.</p>
</li>
<li>
<p>Чтобы <strong>добавлять или удалять участников</strong>, коснитесь названия группы в чате и выберите участника, которого нужно добавить или удалить.</p>
</li>
@@ -556,10 +551,8 @@
</h3>
<ul>
<li>Поскольку вы больше не являетесь участником группы, вы не можете добавлять себя снова.
Однако, это не проблема, просто попросите любого другого участника группы в обычном чате добавить вас снова.</li>
</ul>
<p>Поскольку вы больше не являетесь участником группы, вы не можете добавить себя снова.
Однако, это не проблема, просто попросите любого другого участника группы в обычном чате добавить вас снова.</p>
<h3 id="я-больше-не-хочу-получать-сообщения-группы">
@@ -570,14 +563,12 @@
</h3>
<ul>
<li>
<p>Либо удалите себя из списка участников, либо удалите весь чат.
Если позже вы снова захотите присоединиться к группе, попросите другого участника группы добавить вас.</p>
</li>
<li>
<p>Или, вместо этого, вы можете “отключить уведомления” для группы — это означает, что вы будете получать все сообщения и сможете их писать, но больше не будете получать уведомления о новых сообщениях.</p>
</li>
<li>Либо удалите себя из списка участников, либо удалите весь чат.
Если позже вы снова захотите присоединиться к группе, попросите другого участника группы добавить вас.</li>
</ul>
<p>Или, вместо этого, вы можете “отключить уведомления” для группы - в этом случае вы будете получать все сообщения и
можете их писать, но больше не будете получать уведомления о новых сообщениях.</p>
<h3 id="клонирование-группы">
@@ -603,6 +594,21 @@
<p>Новая группа <strong>полностью независима</strong> от исходной,
которая продолжает работать как прежде.</p>
<h3 id="сколько-участников-может-быть-в-одной-группе">
Сколько участников может быть в одной группе? <a href="#сколько-участников-может-быть-в-одной-группе" class="anchor"></a>
</h3>
<p>Строгого технического ограничения нет,
но не рекомендуется создавать группы больше 150 участников.</p>
<p>По мере увеличения размера групп они могут стать социально нестабильными и потребовать иерархии,
в то время как Delta Chat - это приватный мессенджер для общения на <a href="#groups">равных правах</a>.
Смотрите <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">число Данбара</a> для более глубокого понимания.</p>
<h2 id="webxdc">
@@ -890,9 +896,9 @@ Push-уведомления автоматически активируются
<p>Перепроверьте, что оба устройства находятся <strong>в одной Wi-Fi или локальной сети</strong>.</p>
</li>
<li>
<p>В <strong>Windows</strong> перейдите в <strong>Панель управления / Сеть и Интернет</strong>
<p>В <strong>Windows</strong> перейдите в “Панель управления / Сеть и Интернет”
и убедитесь, что в качестве “Типа сетевого профиля” выбрана <strong>Частная сеть</strong>.
(после передачи, вы можете изменить обратно на исходное значение)</p>
(после передачи можно вернуть исходное значение)</p>
</li>
<li>
<p>На <strong>iOS</strong>, убедитесь, что предоставлен доступ “Настройки системы / Приложения / Delta Chat / <strong>Локальная сеть</strong>”</p>
@@ -985,10 +991,10 @@ PIN-код разблокировки экрана, графический кл
</h2>
<h3 id="экспериментальные-функции">
<h3 id="experiments">
Экспериментальные функции <a href="#экспериментальные-функции" class="anchor"></a>
Экспериментальные функции <a href="#experiments" class="anchor"></a>
</h3>
@@ -1146,9 +1152,7 @@ Chatmail использует INBOX по умолчанию для ретран
</h3>
<ul>
<li>Смотрите <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Стандарты, используемые в Delta Chat</a>.</li>
</ul>
<p>Смотрите <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Стандарты, используемые в Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1177,6 +1181,10 @@ Chatmail использует INBOX по умолчанию для ретран
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> используется для автоматической
настройки сквозного шифрования между контактами и всеми членами группового чата.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, полное внедрение которого запланировано на 2026 год,
обеспечит поддержку постквантового шифрования и прямой секретности.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Обмен контактом в
@@ -1361,12 +1369,10 @@ Delta Chat вместо этого использует реализацию Ope
<p>Таким образом, серверы могут видеть только:</p>
<ul>
<li>адрес отправителя и получателя</li>
<li>а также размер сообщения.</li>
<li>Адреса отправителя и получателя, по умолчанию генерируются случайным образом</li>
<li>Размер сообщения</li>
</ul>
<p>По умолчанию адреса генерируются случайным образом.</p>
<p>Все прочие метаданные сообщений, контактов и групп содержатся в части сообщений, защищённой сквозным шифрованием.</p>
<h3 id="device-seizure">
@@ -1387,6 +1393,34 @@ Delta Chat вместо этого использует реализацию Ope
Кроме того, если устройство изъято, контакты, использующие временные профили,
не могут быть легко идентифицированы.</p>
<h3 id="кто-видит-мой-ip-адрес">
Кто видит мой IP-адрес? <a href="#кто-видит-мой-ip-адрес" class="anchor"></a>
</h3>
<p>Используемый <a href="#relays">релей</a> должен знать ваш IP-адрес,
а также иногда устройства ваших контактов, если вы проводите совместные <a href="#experiments">звонки</a>
или используете <a href="#webxdc">приложения</a>.</p>
<p>IP-адреса необходимы для обеспечения соединения и эффективности.
Они не сохраняются и не передаются третьим лицам.
Обратите внимание, что IP-адрес</p>
<ul>
<li>это не подробный адрес, который вы указываете службе доставки,
а скорее приблизительный, обычно определяющий регион или страну.</li>
</ul>
<p>Поскольку именно так по умолчанию работает интернет и другие мессенджеры,
мы не предлагаем здесь никаких настроек и не задаём предварительных вопросов</p>
<p>Если вы считаете свой IP-адрес угрозой безопасности или конфиденциальности,
мы рекомендуем использовать VPN в сочетании с режимом блокировки системы.
Поиск настроек во всех приложениях на вашем устройстве оставит уязвимости.
Например, нажатие на ссылку раскрывает IP-адрес неизвестным лицам и представляет собой гораздо больший риск в данном случае.</p>
<h3 id="sealedsender">
@@ -1416,7 +1450,7 @@ Delta Chat вместо этого использует реализацию Ope
</h3>
<p>Нет, пока нет.</p>
<p>Пока нет, но это будет реализовано в <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>На данный момент, Delta Chat не поддерживает Perfect Forward Secrecy (PFS) (Совершенную прямую секретность).
Это означает, что если ваш приватный ключ дешифрования будет скомпрометирован,
@@ -1427,12 +1461,9 @@ Delta Chat вместо этого использует реализацию Ope
также может получить все ваши не удалённые сообщения
и ему даже не нужно расшифровывать какие-либо ранее собранные сообщения.</p>
<p>Мы разработали подход к Forward Secrecy (Прямой секретности), который прошёл
первичную проверку некоторыми криптографами и экспертами по реализации
но требует более формального описания
чтобы убедиться, что он надёжно работает в федеративном обмене сообщениями и при использовании нескольких устройств,
прежде чем он может быть внедрён в <a href="https://github.com/chatmail/core">ядро chatmail</a>,
что сделает его доступным во всех <a href="https://chatmail.at/clients">клиентах clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, полное внедрение которого запланировано на 2026 год,
обеспечит надёжное удаление (прямую секретность) за счёт автоматической ротации ключей.
Этот подход описан в черновике спецификации <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a>.</p>
<h3 id="pqc">
@@ -1442,12 +1473,13 @@ Delta Chat вместо этого использует реализацию Ope
</h3>
<p>Нет, пока нет.</p>
<p>Пока нет, но эта возможность появится в <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat использует библиотеку OpenPGP на Rust <a href="https://github.com/rpgp/rpgp">rPGP</a>,
которая поддерживает последний <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">черновик IETF Post-Quantum-Cryptography OpenPGP</a>.
Мы планируем добавить поддержку PQC в <a href="https://github.com/chatmail/core">ядро chatmail</a> после того, как черновик будет окончательно утвержден в IETF
в сотрудничестве с другими разработчиками OpenPGP.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, полное внедрение которого запланировано на 2026 год,
обеспечит поддержку постквантового шифрования для защиты от атак с использованием квантовых компьютеров.
Delta Chat использует Rust-библиотеку OpenPGP <a href="https://github.com/rpgp/rpgp">rPGP</a>
которая поддерживает актуальный черновик IETF <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP</a>.
Особенности реализации описаны в черновике спецификации <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a>.</p>
<h3 id="как-можно-вручную-проверить-информацию-о-шифровании">
@@ -1626,10 +1658,22 @@ Google Play Store, F-Droid, Huawei App Gallery, iOS и macOS App Store, Microsof
<ul>
<li>
<p>Проект ЕС <a href="https://nextleap.eu">NEXTLEAP</a> финансировал исследование
и внедрение проверенных групп и настройку протоколов контактов
в 2017 и 2018 годах, а также помог интегрировать сквозное шифрование
через <a href="https://autocrypt.org">Autocrypt</a>.</p>
<p>В 2023 и 2024 годах мы были приняты в программу Next Generation Internet (NGI)
за нашу работу над <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
в сотрудничестве с партнерами, работающими над
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> и
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
Все эти проекты частично завершены или будут завершены в начале 2025 года.</p>
</li>
<li>
<p>В 2021 г. мы получили дополнительное финансирование из ЕС для двух Next-Generation-Internet
целей, а именно для <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - e-mail provider portability directory</a> (~97 тыс. евро) и <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90 тыс. евро). Это привело к улучшению поддержки нескольких профилей, улучшению настройки контактов и групп с помощью QR-кода и многим улучшениям в сетевом взаимодействии на всех платформах.</p>
</li>
<li>
<p>Фонд <a href="https://nlnet.nl/">NLnet Foundation</a> выделил в 2019/2020 году 46 тысяч евро на
доработку связки Rust/Python и создание экосистемы чат-ботов..</p>
</li>
<li>
<p>Фонд <a href="https://opentechfund.org">Open Technology Fund</a> предоставил нам
@@ -1642,36 +1686,10 @@ Google Play Store, F-Droid, Huawei App Gallery, iOS и macOS App Store, Microsof
предоставить новые функции для всех платформ.</p>
</li>
<li>
<p><a href="https://nlnet.nl/">Фонд NLnet</a> выделил в 2019/2020 году 46 тыс. евро на
завершение привязки Rust/Python и создание экосистемы чат-ботов.</p>
</li>
<li>
<p>В 2021 г. мы получили дополнительное финансирование из ЕС для двух Next-Generation-Internet
целей, а именно для <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - e-mail provider portability directory</a> (~97 тыс. евро) и <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90 тыс. евро). Это привело к улучшению поддержки нескольких профилей, улучшению настройки контактов и групп с помощью QR-кода и многим улучшениям в сетевом взаимодействии на всех платформах.</p>
</li>
<li>
<p>С конца 2021 года по март 2023 года мы получили финансирование в размере ($500 тыс.) от
U.S. Bureau of Democracy, Human Rights and Labor (DRL) для поддержки <em>свободы интернета</em>.
Это финансирование поддержало наши долгосрочные цели, сделать Delta Chat более удобным для использования
и совместимым с широким спектром электронных почтовых серверов по всему миру, а также более устойчивым
и безопасным в местах, часто подвергающихся интернет-цензуре и отключениям.</p>
</li>
<li>
<p>2023-2024 мы завершили проект финансируемый OTF
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
что позволило нам внедрить гарантированное шифрование,
создать сеть серверов <a href="https://delta.chat/chatmail">chatmail</a>
и обеспечить “немедленную регистрацию” во всех приложениях, выпущенных с апреля 2024 года.</p>
</li>
<li>
<p>В 2023 и 2024 годах мы были приняты в программу Next Generation Internet (NGI)
за нашу работу над <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
в сотрудничестве с партнерами, работающими над
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> и
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
Все эти проекты частично завершены или будут завершены в начале 2025 года.</p>
<p>Проект ЕС <a href="https://nextleap.eu">NEXTLEAP</a> финансировал исследование
и внедрение проверенных групп и настройку протоколов контактов
в 2017 и 2018 годах, а также помог интегрировать сквозное шифрование
через <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Иногда мы получаем разовые пожертвования от физических лиц.
+132 -118
View File
@@ -15,7 +15,7 @@
<li><a href="#čo-znamenajú-zaškrtnutia-zobrazené-vedľa-odchádzajúcich-správ">Čo znamenajú zaškrtnutia zobrazené vedľa odchádzajúcich správ?</a></li>
<li><a href="#edit">Correct typos and delete messages after sending</a></li>
<li><a href="#ephemeralmsgs">How do disappearing messages work?</a></li>
<li><a href="#delold">What happens if I turn on “Delete old messages from device”?</a></li>
<li><a href="#delold">What happens if I turn on “Delete Messages from Device”?</a></li>
<li><a href="#remove-account">How can I delete my chat profile?</a></li>
</ul>
</li>
@@ -26,6 +26,7 @@
<li><a href="#omylom-som-sa-vymazal">Omylom som sa vymazal.</a></li>
<li><a href="#už-viac-nechcem-dostávať-správy-od-skupiny">Už viac nechcem dostávať správy od skupiny.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">How does Delta Chat protect metadata in messages?</a></li>
<li><a href="#device-seizure">How to protect metadata and contacts when a device is seized?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Yes. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
</li>
</ul>
<p>For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.</p>
<h3 id="multiple-accounts">
@@ -262,16 +260,11 @@ or to <strong>Switch Profiles</strong>.</p>
</h3>
<ul>
<li>
<p>V nastaveniach si môžete pridať profilový obrázok. Ak napíšete svojim kontaktom
<p>V nastaveniach si môžete pridať profilový obrázok. Ak napíšete svojim kontaktom
alebo si ich pridáte pomocou QR kódu, automaticky to vidia ako váš profilový obrázok.</p>
</li>
<li>
<p>Z dôvodu ochrany osobných údajov nikto nevidí váš profilový obrázok, kým im nenapíšete
<p>Z dôvodu ochrany osobných údajov nikto nevidí váš profilový obrázok, kým im nenapíšete
správu.</p>
</li>
</ul>
<h3 id="signature">
@@ -305,7 +298,8 @@ they will see it when they view your contact details.</p>
</li>
<li>
<p><strong>Archive chats</strong> if you do not want to see them in your chat list any longer.
Archived chats remain accessible above the chat list or via search.</p>
They remain accessible above the chat list or via search
and are marked by <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Archived</b></p>
</li>
<li>
<p>When an archived chat gets a new message, unless muted, it will <strong>pop out of the archive</strong> and back into your chat list.
@@ -340,7 +334,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -377,22 +371,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -457,19 +447,18 @@ the (anyway encrypted) messages may take longer to get deleted from their server
<h3 id="delold">
What happens if I turn on “Delete old messages from device”? <a href="#delold" class="anchor"></a>
What happens if I turn on “Delete Messages from Device”? <a href="#delold" class="anchor"></a>
</h3>
<ul>
<li>If you want to save storage on your device, you can choose to delete old
messages automatically.</li>
<li>To turn it on, go to “delete old messages from device” in the “Chats &amp; Media”
settings. You can set a timeframe between “after an hour” and “after a year”;
<p>If you want to save storage on your device, you can choose to delete old
messages automatically.</p>
<p>To turn it on, go to <strong>Settings → Chats → Delete Message from Device</strong>.
You can set a timeframe between “after an hour” and “after a year”;
this way, <em>all</em> messages will be deleted from your device as soon as they are
older than that.</li>
</ul>
older than that.</p>
<h3 id="remove-account">
@@ -517,9 +506,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Vyberte <strong>Nový chat</strong> a potom <strong>Nová skupina</strong> z ponuky v pravom hornom rohu alebo stlačte príslušné tlačidlo v systéme Android/iOS.</li>
<li>Na nasledujúcej obrazovke vyberte <strong>členov skupiny</strong> a definujte <strong>názov skupiny</strong>. Môžete si tiež vybrať <strong>avatara skupiny</strong>.</li>
<li>Hneď ako napíšete <strong>prvú správu</strong> v skupine, všetci členovia sú informovaní o novej skupine a môžu odpovedať v skupine (pokiaľ nenapíšete správu v skupine, skupina je pre skupinu neviditeľná členovia).</li>
<li>
<p>Vyberte <strong>Nový chat</strong> a potom <strong>Nová skupina</strong> z ponuky v pravom hornom rohu alebo stlačte príslušné tlačidlo v systéme Android/iOS.</p>
</li>
<li>
<p>Na nasledujúcej obrazovke vyberte <strong>členov skupiny</strong> a definujte <strong>názov skupiny</strong>. Môžete si tiež vybrať <strong>avatara skupiny</strong>.</p>
</li>
<li>
<p>Hneď ako napíšete <strong>prvú správu</strong> v skupine, všetci členovia sú informovaní o novej skupine a môžu odpovedať v skupine (pokiaľ nenapíšete správu v skupine, skupina je pre skupinu neviditeľná členovia).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -530,11 +525,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -562,10 +556,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Keďže už nie ste členom skupiny, nemôžete sa znova pridať.
Žiadny problém, jednoducho požiadajte ktoréhokoľvek iného člena skupiny v bežnom chate, aby vás znova pridal.</li>
</ul>
<p>Keďže už nie ste členom skupiny, nemôžete sa znova pridať.
Žiadny problém, jednoducho požiadajte ktoréhokoľvek iného člena skupiny v bežnom chate, aby vás znova pridal.</p>
<h3 id="už-viac-nechcem-dostávať-správy-od-skupiny">
@@ -576,15 +568,12 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>
<p>Vymažte sa zo zoznamu členov alebo odstráňte celý chat.
Ak sa chcete neskôr znova pripojiť k skupine, požiadajte iného člena skupiny, aby vás znova pridal.</p>
</li>
<li>
<p>Ako alternatívu môžete tiež “Stlmiť” skupinu - znamená to, že budete dostávať všetky správy a
môžete stále písať, ale už nebudete upozorňovaní na žiadne nové správy.</p>
</li>
<li>Vymažte sa zo zoznamu členov alebo odstráňte celý chat.
Ak sa chcete neskôr znova pripojiť k skupine, požiadajte iného člena skupiny, aby vás znova pridal.</li>
</ul>
<p>Ako alternatívu môžete tiež “Stlmiť” skupinu - znamená to, že budete dostávať všetky správy a
môžete stále písať, ale už nebudete upozorňovaní na žiadne nové správy.</p>
<h3 id="cloning-a-group">
@@ -610,6 +599,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -898,7 +902,7 @@ One device is not needed for the other to work.</p>
<p>Double-check both devices are in the <strong>same Wi-Fi or network</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -993,10 +997,10 @@ alebo AppImage pre Linux. Nájdete ich na
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1032,7 +1036,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1155,9 +1159,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Pozrite si <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Štandardy používané v Delta Chate</a>.</li>
</ul>
<p>Pozrite si <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Štandardy používané v Delta Chate</a>.</p>
<h2 id="e2ee">
@@ -1186,6 +1188,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1370,12 +1376,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1396,6 +1400,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1425,7 +1455,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1436,12 +1466,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1451,12 +1478,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1635,52 +1663,38 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
<p>The <a href="https://opentechfund.org">Open Technology Fund</a> gave us a
first 2018/2019 grant (~$200K) during which we majorly improved the Android app
and released a first Desktop app beta version, and which moreover
moored our feature developments in UX research in human rights contexts,
see our concluding <a href="https://delta.chat/en/2019-07-19-uxreport">Needfinding and UX report</a>.
The second 2019/2020 grant (~$300K) helped us to
release Delta/iOS versions, to convert our core library to Rust, and
to provide new features for all platforms.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Sometimes we receive one-time donations from private individuals.
+131 -116
View File
@@ -26,6 +26,7 @@
<li><a href="#fshiva-veten-padashje">Fshiva veten padashje.</a></li>
<li><a href="#sdua-ti-marr-më-mesazhet-e-një-grupi">S’dua t’i marr më mesazhet e një grupi.</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">Si i mbron Delta Chat-i tejtëdhënat në mesazhe?</a></li>
<li><a href="#device-seizure">Si të mbrohen tejtëdhënat dhe kontaktet, kur shtien në dorë një pajisje?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Does Delta Chat support Perfect Forward Secrecy?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Po Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Po Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>Si parazgjedhje, për funksionim më të mirë, figurat optimizohen dhe dërgohen në madhësi më të vogël, por mund ta dërgoni si një “kartelë”, që të ruhet origjinali.</p>
</li>
</ul>
<p>Si parazgjedhje, për funksionim më të mirë, figurat optimizohen dhe dërgohen në madhësi më të vogël, por mund ta dërgoni si një “kartelë”, që të ruhet origjinali.</p>
<h3 id="multiple-accounts">
@@ -262,16 +260,11 @@ or to <strong>Switch Profiles</strong>.</p>
</h3>
<ul>
<li>
<p>Mund të shtoni një foto profili te rregullimet tuaja. Nëse u shkruani kontakteve
tuaja ose i shtoni përmes kodi QR, e shohin automatikisht si foton e profilit tuaj.</p>
</li>
<li>
<p>Për arsye privatësie, askush s’e sheh foton tuaj të profilit, deri sa
t’u shkruani një mesazh.</p>
</li>
</ul>
<p>Mund të shtoni një foto profili te rregullimet tuaja. Nëse u shkruani kontakteve
tuaja ose i shtoni përmes kodi QR, e shohin automatikisht si foton e profilit tuaj.</p>
<p>Për arsye privatësie, askush s’e sheh foton tuaj të profilit, deri sa
t’u shkruani një mesazh.</p>
<h3 id="signature">
@@ -304,8 +297,7 @@ they will see it when they view your contact details.</p>
<p><strong>Heshtoni fjalosje</strong>, nëse s’doni të merrni njoftime mbi to. Fjalosjet e heshtuara qëndrojnë në vend dhe mundeni edhe të fiksoni një fjalosje të heshtuar.</p>
</li>
<li>
<p><strong>Arkivoni fjalosje</strong>, nëse s’doni t’i shihni më në listën tuaj të fjalosjeve.
Fjalosjet e arkivuara mbesin të përdorshme mbi listën e fjalosjeve, ose përmes kërkimit.</p>
<p><strong>Arkivoni fjalosje</strong>, nëse s’doni t’i shihni më në listën tuaj të fjalosjeve. Fjalosjet e arkivuara mbesin të përdorshme mbi listën e fjalosjeve, ose përmes kërkimit.</p>
</li>
<li>
<p>Kur te një fjalosje e arkivuar vjen një mesazh i ri, do të <strong>hapet jashtë arkivit</strong> dhe kalojë te lista juaj e fjalosjeve, veç në mos qoftë e heshtuar.
@@ -341,7 +333,7 @@ By tapping <img style="vertical-align:middle; width:1.2em; margin:1px" src="../g
you can go back to the original message in the original chat</p>
</li>
<li>
<p>Finally, you can also use “Save Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
<p>Finally, you can also use “Saved Messages” to take <strong>personal notes</strong> - open the chat, type something, add a photo or a voice message etc.</p>
</li>
<li>
<p>As “Saved Message” are synced, they can become very handy for transferring data between devices</p>
@@ -378,22 +370,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -463,14 +451,13 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>Nëse doni të kurseni hapësirë në pajisjen tuaj, mund të zgjidhni të fshihen
automatikisht mesazhe të vjetër.</li>
<li>Për ta aktivizuar, kaloni te “fshi prej pajisjeje mesazhe të vjetër”, te rregullimet
<p>Nëse doni të kurseni hapësirë në pajisjen tuaj, mund të zgjidhni të fshihen
automatikisht mesazhe të vjetër.</p>
<p>Për ta aktivizuar, kaloni te “fshi prej pajisjeje mesazhe të vjetër”, te rregullimet
“Fjalosje &amp; Media”. Mund të caktoni një periudhë nga “pas një ore” e deri
“pas një viti”; në këtë mënyrë, <em>krejt</em> mesazhet do të fshihen nga pajisja juaj
sapo të jenë më të vjetër se aq.</li>
</ul>
sapo të jenë më të vjetër se aq.</p>
<h3 id="remove-account">
@@ -518,9 +505,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Prej menusë në cepin e sipërm djathtas, përzgjidhni <strong>Fjalosje e re</strong> dhe mandej <strong>Grup i ri</strong>, ose shtypni butonin përgjegjës në Android/iOS.</li>
<li>Te skena vijuese, përzgjidhni <strong>anëtarë grupi</strong> dhe përcaktoni një <strong>emër grupi</strong>. Mund të përzgjidhni edhe një <strong>avatar grupi</strong>.</li>
<li>Sapo të shkruani <strong>mesazhin e parë</strong> te grupi, krejt anëtarët marrin vesh për grupin e ri dhe mund të përgjigjen në të (për sa kohë që te grupi s’shkruani një mesazh i cili është i padukshëm për anëtarët).</li>
<li>
<p>Prej menusë në cepin e sipërm djathtas, përzgjidhni <strong>Fjalosje e re</strong> dhe mandej <strong>Grup i ri</strong>, ose shtypni butonin përgjegjës në Android/iOS.</p>
</li>
<li>
<p>Te skena vijuese, përzgjidhni <strong>anëtarë grupi</strong> dhe përcaktoni një <strong>emër grupi</strong>. Mund të përzgjidhni edhe një <strong>avatar grupi</strong>.</p>
</li>
<li>
<p>Sapo të shkruani <strong>mesazhin e parë</strong> te grupi, krejt anëtarët marrin vesh për grupin e ri dhe mund të përgjigjen në të (për sa kohë që te grupi s’shkruani një mesazh i cili është i padukshëm për anëtarët).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -531,11 +524,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -563,10 +555,8 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Ngaqë s’jeni më anëtar i grupit, s’mund të shtoni veten sërish.
Megjithatë, s’ka problem, thjesht kërkojini një anëtari tjetër të grupit në një fjalosje të zakonshme t’ju shtojë sërish.</li>
</ul>
<p>Ngaqë s’jeni më anëtar i grupit, s’mund të shtoni veten sërish.
Megjithatë, s’ka problem, thjesht kërkojini një anëtari tjetër të grupit në një fjalosje të zakonshme t’ju shtojë sërish.</p>
<h3 id="sdua-ti-marr-më-mesazhet-e-një-grupi">
@@ -577,16 +567,13 @@ Megjithatë, s’ka problem, thjesht kërkojini një anëtari tjetër të grupit
</h3>
<ul>
<li>
<p>Ose fshini veten si anëtar i listës, ose fshini krejt bisedën.
Nëse më vonë doni të ribëheni pjesë e grupit, kërkojini një anëtari tjetër të grupit t’ju shtojë sërish.</p>
</li>
<li>
<p>Ndryshe, mundeni edhe ta “Heshtoni” një grup - duke bërë këtë, do të merrni
<li>Ose fshini veten si anëtar i listës, ose fshini krejt bisedën.
Nëse më vonë doni të ribëheni pjesë e grupit, kërkojini një anëtari tjetër të grupit t’ju shtojë sërish.</li>
</ul>
<p>Ndryshe, mundeni edhe ta “Heshtoni” një grup - duke bërë këtë, do të merrni
krejt mesazhet dhe prapë mund të shkruani, por nuk njoftoheni më,
për çfarëdo mesazhesh të rinj.</p>
</li>
</ul>
<h3 id="cloning-a-group">
@@ -612,6 +599,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -900,7 +902,7 @@ Njëra pajisja s’ka nevojë për tjetrën që të funksionojë.</p>
<p>Kontrolloni sërish që të dyja pajisjet të gjenden në <strong>të njëjtin rrjet Wi-Fi ose klasik</strong></p>
</li>
<li>
<p>On <strong>Windows</strong>, go to <strong>Control Panel / Network and Internet</strong>
<p>On <strong>Windows</strong>, go to “Control Panel / Network and Internet”
and make sure, <strong>Private Network</strong> is selected as “Network profile type”
(after transfer, you can change back to the original value)</p>
</li>
@@ -997,10 +999,10 @@ Windows Desktop, ose AppImage për Linux. Mund t’i gjeni te
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1036,7 +1038,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1159,9 +1161,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>Shihni <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standarde të përdorur në Delta Chat</a>.</li>
</ul>
<p>Shihni <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Standarde të përdorur në Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1190,6 +1190,10 @@ to exchange encryption setup information through QR-code scanning or “invite l
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
establishing end-to-end encryption between contacts and all members of a group chat.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Sharing a contact to a
@@ -1374,12 +1378,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1400,6 +1402,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1429,7 +1457,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1440,12 +1468,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1455,12 +1480,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1639,10 +1665,25 @@ ordered chronologically:</p>
<ul>
<li>
<p>The <a href="https://nextleap.eu">NEXTLEAP</a> EU project funded the research
and implementation of verified groups and setup contact protocols
in 2017 and 2018 and also helped to integrate end-to-end Encryption
through <a href="https://autocrypt.org">Autocrypt</a>.</p>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
</li>
<li>
<p>Më 2021-n morëm financime të mëtejshme nga BE për dy propozime që shtrihen në
“Internetin e Brezit Tjetër”, konkretisht për <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - e-mail provider portability directory</a> (~97K euro) dhe <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K euro) që sollën mbulim më të mirë për përdorues me shumë
llogari, përmirësim të gjërave për kontakte me kod QR dhe grupe, si dhe mjaft
përmirësime në punën në rrjet për krejt platformat.</p>
</li>
<li>
<p><a href="https://nlnet.nl/">Fondacioni NLnet</a> dhuroi 46K euro gjatë 2019/2020 për
plotësimin e <em>Rust/Python bindings</em> dhe për t’i dhënë udhë një ekosistemi
Chat-bot.</p>
</li>
<li>
<p><a href="https://opentechfund.org">Open Technology Fund</a> na dha grantin e parë
@@ -1655,36 +1696,10 @@ versione Delta/iOS, për të shndërruar bibliotekën tonë bazë në Rust, si d
për të sjellë veçori të reja për krejt platformat.</p>
</li>
<li>
<p>The <a href="https://nlnet.nl/">NLnet foundation</a> granted in 2019/2020 EUR 46K for
completing Rust/Python bindings and instigating a Chat-bot eco-system.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
</li>
<li>
<p>2023-2024 we successfully completed the OTF-funded
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail project</a>,
allowing us to introduce guaranteed encryption,
creating a <a href="https://delta.chat/chatmail">chatmail server network</a>
and providing “instant onboarding” in all apps released from April 2024 on.</p>
</li>
<li>
<p>In 2023 and 2024 we got accepted in the Next Generation Internet (NGI)
program for our work in <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>,
along with collaboration partners working on
<a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>,
<a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>,
<a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> and
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>.
All of these projects are partially completed or to be completed in early 2025.</p>
<p>Projekti <a href="https://nextleap.eu">NEXTLEAP</a> i BE-së financoi kërkimin
për dhe sendërtimin e grupeve të verifikuara dhe protokolleve të
ujdisjes së kontakteve më 2017-n dhe 2018-n dhe ndihmoi gjithashtu
të integrohet Fshehtëzim Skaj-më-Skaj përmes <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Ndonjëherë marrim dhurime unike nga individë privatë.
+110 -92
View File
@@ -25,6 +25,7 @@
<li><a href="#я-випадково-себе-видалив">Я випадково себе видалив</a></li>
<li><a href="#я-більше-не-хочу-отримувати-повідомлення-групи">Я більше не хочу отримувати повідомлення групи.</a></li>
<li><a href="#клонування-групи">Клонування групи</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -53,7 +54,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#експериментальні-функції">Експериментальні функції</a></li>
<li><a href="#experiments">Експериментальні функції</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -75,6 +76,7 @@
<li><a href="#чи-повідомлення-позначені-значком-пошти-доступні-в-інтернетіtls">Чи повідомлення, позначені значком пошти, доступні в Інтернеті?{#tls}</a></li>
<li><a href="#message-metadata">Як Delta Chat захищає метадані у повідомленнях?</a></li>
<li><a href="#device-seizure">Як захистити метадані та контакти якщо пристрій вилучено?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Чи підтримує Delta Chat функцію “Запечатаний відправник”?</a></li>
<li><a href="#pfs">Чи підтримує Delta Chat цілковиту пряму секретність (Perfect Forward Secrecy)?</a></li>
<li><a href="#pqc">Чи підтримує Delta Chat пост-квантову криптографію?</a></li>
@@ -138,17 +140,10 @@
<ul>
<li>
<p>If you are <strong>face to face</strong> with your friend or family,
tap the <strong>QR Code</strong> icon <img style="vertical-align:middle; height:1.3em; margin:1px" src="../qr-icon.png" />
on the main screen.<br />
Ask your chat partner to <strong>scan</strong> the QR image
with their Delta Chat app.</p>
<p>Якщо ви перебуваєте <strong>віч-на-віч</strong> зі своїм другом або родиною, торкніться піктограми <strong>QR-код</strong> на головному екрані <img style="vertical-align:middle; height:1.3em; margin:1px" src="../qr-icon.png" /> на головному екрані. Попросіть вашого партнера по чату <strong>сканувати</strong> QR-зображення за допомогою їхнього застосунку Delta Chat.</p>
</li>
<li>
<p>For a <strong>remote</strong> contact setup,
from the same screen,
click “Copy” or “Share” and send the <strong>invite link</strong>
through another private chat.</p>
<p>Для <strong>віддаленого</strong> налаштування контакту, на тому ж самому екрані, натисніть “Копіювати” або “Поділитися” і відправте <strong>запрошувальне посилання</strong> через інший приватний чат.</p>
</li>
</ul>
@@ -180,7 +175,8 @@ the ability to chat is delayed until connectivity is restored.</p>
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -216,15 +212,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>Так. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>Так. Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>З міркувань продуктивності, зображення оптимізовані та надсилаються в меншому розмірі за замовчуванням, але ви можете надіслати їх як «файл», щоб зберегти оригінал.</p>
</li>
</ul>
<p>З міркувань продуктивності, зображення оптимізовані та надсилаються в меншому розмірі за замовчуванням, але ви можете надіслати їх як «файл», щоб зберегти оригінал.</p>
<h3 id="multiple-accounts">
@@ -254,14 +245,9 @@ and uses the server only to relay messages.</p>
</h3>
<ul>
<li>
<p>Ви можете додати зображення профілю в ваших налаштуваннях. Якщо ви пишете комусь із ваших контактів чи додаєте їх через QR код, вони автоматично побачать ваше зображення профілю.</p>
</li>
<li>
<p>Із міркувань приватності, ніхто не бачить ваше зображення профілю доки ви їм не напишете.</p>
</li>
</ul>
<p>Ви можете додати зображення профілю в ваших налаштуваннях. Якщо ви пишете комусь із ваших контактів чи додаєте їх через QR код, вони автоматично побачать ваше зображення профілю.</p>
<p>Із міркувань приватності, ніхто не бачить ваше зображення профілю доки ви їм не напишете.</p>
<h3 id="signature">
@@ -294,8 +280,7 @@ they will see it when they view your contact details.</p>
<p><strong>Приглушіть чати</strong> якщо ви не хочете отримувати сповіщення для них. Приглушені чати залишаються на місці і ви також можете закріпити приглушений чат.</p>
</li>
<li>
<p><strong>Архівуйте чати</strong>, якщо ви більше не хочете бачити їх у своєму списку чатів.
Заархівовані чати залишаються доступними над списком чатів або через пошук.</p>
<p><strong>Архівуйте чати</strong>, якщо ви більше не хочете бачити їх у своєму списку чатів. Заархівовані чати залишаються доступними над списком чатів або через пошук.</p>
</li>
<li>
<p>Коли архівний чат отримує нове повідомлення, якщо не приглушений, він <strong>вискочить з архіву</strong> і повернеться у ваш список чатів.
@@ -362,22 +347,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -438,11 +419,10 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>Якщо ви хочете заощадити пам’ять на своєму пристрої, ви можете видалити старе повідомлення автоматично.</li>
<li>Щоб увімкнути його, перейдіть до «видалити старі повідомлення з пристрою» в налаштуваннях «Чатів та медіа» . Ви можете встановити часові рамки від «через годину» до «через рік»;
Таким чином, <em>усі</em> повідомлення будуть видалені з вашого пристрою, як тільки вони будуть старішими за це.</li>
</ul>
<p>Якщо ви хочете заощадити пам’ять на своєму пристрої, ви можете видалити старе повідомлення автоматично.</p>
<p>Щоб увімкнути його, перейдіть до «видалити старі повідомлення з пристрою» в налаштуваннях «Чатів та медіа» . Ви можете встановити часові рамки від «через годину» до «через рік»;
Таким чином, <em>усі</em> повідомлення будуть видалені з вашого пристрою, як тільки вони будуть старішими за це.</p>
<p>Як я можу видалити свій профіль у Delta Chat? {#remove-account}</p>
@@ -484,9 +464,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>Оберіть <strong>Новий чат</strong>, потім <strong>Нова групи</strong> у меню в верхньому правому кутку або натисніть відповідну кнопку у Android/iOS.</li>
<li>На наступному екрані виберіть <strong>учасники групи</strong> та встановіть <strong>назву групи</strong>. Ви також можете обрати <strong>аватар групи</strong>.</li>
<li>Як тільки ви напишете <strong>перше повідомлення</strong> у групу, усі учасники будуть проінформовані про нову групу і зможуть відповісти у нову групу (доки ви не напишете повідомлення у групі, група залишатиметься невидимою для учасників).</li>
<li>
<p>Оберіть <strong>Новий чат</strong>, потім <strong>Нова групи</strong> у меню в верхньому правому кутку або натисніть відповідну кнопку у Android/iOS.</p>
</li>
<li>
<p>На наступному екрані виберіть <strong>учасники групи</strong> та встановіть <strong>назву групи</strong>. Ви також можете обрати <strong>аватар групи</strong>.</p>
</li>
<li>
<p>Як тільки ви напишете <strong>перше повідомлення</strong> у групу, усі учасники будуть проінформовані про нову групу і зможуть відповісти у нову групу (доки ви не напишете повідомлення у групі, група залишатиметься невидимою для учасників).</p>
</li>
</ul>
<h3 id="addmembers">
@@ -497,11 +483,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
<ul>
<li>
<p>Усі учасники групи мають <strong>однакові права</strong>.
Тому кожен може видалити будь-якого учасника або додати нових.</p>
</li>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -529,9 +514,7 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>Оскільки ви більше не учасник групи, ви не зможете додати себе знову. Однак, це не проблема, просто попросіть будь-якого іншого учасника групи в звичайному чаті додати вас знову.</li>
</ul>
<p>Оскільки ви більше не учасник групи, ви не зможете додати себе знову. Однак, це не проблема, просто попросіть будь-якого іншого учасника групи в звичайному чаті додати вас знову.</p>
<h3 id="я-більше-не-хочу-отримувати-повідомлення-групи">
@@ -542,13 +525,10 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>
<p>Або видаліть себе із списку учасників групи, або видаліть весь чат. Якщо ви хочете повернутись до чату пізніше, попросіть іншого учасника групи додати вас знову.</p>
</li>
<li>
<p>Ви також можете “Заглушити” групу - це означає, що ви будете отримувати усі повідомлення та можете писати у групу, але ви більше не будете отримувати сповіщення про нові повідомлення.</p>
</li>
<li>Або видаліть себе із списку учасників групи, або видаліть весь чат. Якщо ви хочете повернутись до чату пізніше, попросіть іншого учасника групи додати вас знову.</li>
</ul>
<p>Ви також можете “Заглушити” групу - це означає, що ви будете отримувати усі повідомлення та можете писати у групу, але ви більше не будете отримувати сповіщення про нові повідомлення.</p>
<h3 id="клонування-групи">
@@ -574,6 +554,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>Нова група є <strong>цілком незалежною</strong> від оригінальної,
котра продовжує працювати як раніше.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -831,7 +826,7 @@ Welcome to the power of the interoperable chatmail relay network :)</p>
<p>Ще раз упевніться, що обидва пристрої підключені до <strong>одного Wi-Fi або мережі</strong></p>
</li>
<li>
<p>У <strong>Windows</strong> перейдіть до <strong>Панель керування / Мережа та Інтернет</strong> і переконайтеся, що <strong>Приватна мережа</strong> вибрано як “Тип мережевого профілю” (після перенесення ви можете повернути початкове значення)</p>
<p>У <strong>Windows</strong> перейдіть до “Панель керування / Мережа та Інтернет” і переконайтеся, що <strong>Приватна мережа</strong> вибрано як “Тип мережевого профілю” (після перенесення ви можете повернути початкове значення)</p>
</li>
<li>
<p>На <strong>iOS</strong> переконайтеся, що доступ до “Системні налаштування / Програми / Delta Chat / <strong>Локальна мережа</strong>” дозволено</p>
@@ -904,10 +899,10 @@ Welcome to the power of the interoperable chatmail relay network :)</p>
</h2>
<h3 id="експериментальні-функції">
<h3 id="experiments">
Експериментальні функції <a href="#експериментальні-функції" class="anchor"></a>
Експериментальні функції <a href="#experiments" class="anchor"></a>
</h3>
@@ -943,7 +938,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1066,9 +1061,7 @@ to send anonymous usage statistics.</p>
</h3>
<ul>
<li>Дивіться <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Стандарти, що використовуються у Delta Chat</a>.</li>
</ul>
<p>Дивіться <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Стандарти, що використовуються у Delta Chat</a>.</p>
<h2 id="e2ee">
@@ -1095,6 +1088,10 @@ to send anonymous usage statistics.</p>
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> використовується для автоматичного встановлення наскрізного шифрування між контактами і всіма учасниками групового чату.</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">Поширення контакту в чаті</a> дозволяє отримувачам використовувати наскрізне шифрування з контактом.</p>
</li>
@@ -1246,6 +1243,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1272,11 +1295,13 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>Ні, поки ще ні.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat наразі не підтримує ідеальну пряму секретність (Perfect Forward Secrecy, PFS). Це означає, що якщо ваш приватний ключ для розшифрування буде скомпрометовано, а хтось заздалегідь зібрав ваші повідомлення під час передачі, він зможе розшифрувати та прочитати їх, використовуючи зламаний ключ. Зверніть увагу, що пряма секретність підвищує рівень безпеки лише в тому разі, якщо ви видаляєте повідомлення. Інакше, якщо хтось отримує доступ до ваших ключів розшифрування, він зазвичай також має доступ до всіх ваших невидалених повідомлень і навіть не потребує розшифровувати заздалегідь перехоплені дані.</p>
<p>Ми розробили підхід Forward Secrecy, який витримав початкову експертизу від деяких криптографів та експертів з реалізації але чекає на більш офіційний звіт щоб переконатися, що він надійно працює в об’єднаних системах обміну повідомленнями та при використанні декількох пристроїв, перш ніж його можна буде реалізувати в <a href="https://github.com/chatmail/core">ядрі чату</a>, що зробить його доступним у всіх <a href="https://chatmail.at/clients">клієнтах чату</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1286,9 +1311,13 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>Ні, поки ще ні.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat використовує бібліотеку Rust OpenPGP <a href="https://github.com/rpgp/rpgp">rPGP</a> яка підтримує останню версію <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>. Ми плануємо додати підтримку PQC у <a href="https://github.com/chatmail/core">chatmail core</a> після того, як проект буде завершено у IETF у співпраці з іншими розробниками OpenPGP.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="як-я-можу-вручну-перевірити-інформацію-про-шифрування">
@@ -1419,7 +1448,14 @@ Google Play Store, F-Droid, Huawei App Gallery, iOS and macOS App Store, Microso
<ul>
<li>
<p>Проект ЄС <a href="https://nextleap.eu">NEXTLEAP</a> фінансував дослідження та впровадження верифікованих груп і протоколів встановлення контактів у 2017 та 2018 роках, а також допоміг інтегрувати наскрізне шифрування через <a href="https://autocrypt.org">Autocrypt</a>.</p>
<p>У 2023 та 2024 роках нас прийняли до програми Next Generation Internet (NGI) за нашу роботу над <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>, а також у співпраці з партнерами, які працюють над <a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>, <a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>, <a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> та <a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>. Усі ці проєкти частково завершені або будуть завершені на початку 2025 року.</p>
</li>
<li>
<p>У 2021 році ми отримали подальше фінансування від ЄС на дві пропозиції щодо Інтернету наступного покоління а саме на <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - каталог перенесення провайдерів електронної пошти</a> (~97 тис. євро) та <a href="https://nlnet.nl/project/EmailPorting/">AEAP - перенесення адрес електронної пошти</a> (~90 тис. євро), що дозволило нам покращити багатопрофільну підтримку, вдосконалити налаштування контактів та груп за допомогою QR-коду та багато інших мережевих покращень на всіх платформах.</p>
</li>
<li>
<p>Фонд <a href="https://nlnet.nl/">NLnet</a> виділив у 2019/2020 роках 46 тисяч євро на
завершення прив’язок Rust/Python та запуск екосистеми чат-ботів.</p>
</li>
<li>
<p><a href="https://opentechfund.org">Open Technology Fund</a> надав нам два гранти.
@@ -1432,25 +1468,7 @@ Google Play Store, F-Droid, Huawei App Gallery, iOS and macOS App Store, Microso
і додати нові функції для всіх платформ.</p>
</li>
<li>
<p>Фонд <a href="https://nlnet.nl/">NLnet</a> виділив у 2019/2020 роках 46 тисяч євро на
завершення прив’язок Rust/Python та запуск екосистеми чат-ботів.</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
</li>
<li>
<p>У 2023-2024 роках ми успішно завершили проєкт <a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">Secure Chatmail</a>, що фінансувався OTF, що дозволило нам запровадити гарантоване шифрування, створити <a href="https://delta.chat/chatmail">мережу серверів chatmail</a> та забезпечити “миттєву реєстрацію” у всіх застосунках, випущених з квітня 2024 року.</p>
</li>
<li>
<p>У 2023 та 2024 роках нас прийняли до програми Next Generation Internet (NGI) за нашу роботу над <a href="https://nlnet.nl/project/WebXDC-Push/">webxdc PUSH</a>, а також у співпраці з партнерами, які працюють над <a href="https://nlnet.nl/project/Webxdc-Evolve/">webxdc evolve</a>, <a href="https://nlnet.nl/project/WebXDC-XMPP/">webxdc XMPP</a>, <a href="https://nlnet.nl/project/DeltaTouch/">DeltaTouch</a> та <a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a>. Усі ці проєкти частково завершені або будуть завершені на початку 2025 року.</p>
<p>Проект ЄС <a href="https://nextleap.eu">NEXTLEAP</a> фінансував дослідження та впровадження верифікованих груп і протоколів встановлення контактів у 2017 та 2018 роках, а також допоміг інтегрувати наскрізне шифрування через <a href="https://autocrypt.org">Autocrypt</a>.</p>
</li>
<li>
<p>Іноді ми отримуємо одноразові пожертви від приватних осіб. Наприклад, у 2021 році щедра приватна особа перерахував нам 4 тис. євро з повідомленням «так тримати!». 💜 Ми використовуємо такі пожертви для фінансування зборів на розвиток або для тимчасових витрат, які важко передбачити або відшкодувати за рахунок грантів державного фінансування. Отримання більшої кількості пожертв також допомагає нам стати більш незалежними та довгостроково життєздатними як спільнота контриб’юторів.</p>
+111 -99
View File
@@ -26,6 +26,7 @@
<li><a href="#我不小心删除了我自己">我不小心删除了我自己。</a></li>
<li><a href="#我不想再收到某个群组中的消息了">我不想再收到某个群组中的消息了。</a></li>
<li><a href="#cloning-a-group">Cloning a group</a></li>
<li><a href="#how-many-members-can-participate-in-a-single-group">How many members can participate in a single group?</a></li>
</ul>
</li>
<li><a href="#webxdc">In-chat apps</a>
@@ -54,7 +55,7 @@
</li>
<li><a href="#advanced">Advanced</a>
<ul>
<li><a href="#experimental-features">Experimental Features</a></li>
<li><a href="#experiments">Experimental Features</a></li>
<li><a href="#relays">What are Relays?</a></li>
<li><a href="#can-i-use-a-classic-email-address-with-delta-chat">Can I use a classic email address with Delta Chat?</a></li>
<li><a href="#classic-email">How can I configure a chat profile with a classic email address as relay?</a></li>
@@ -76,6 +77,7 @@
<li><a href="#tls">Are messages marked with the mail icon exposed on the Internet?</a></li>
<li><a href="#message-metadata">Delta Chat 如何保护消息中的元数据?</a></li>
<li><a href="#device-seizure">当设备被查封时,如何保护元数据和联系人?</a></li>
<li><a href="#who-sees-my-ip-address">Who sees my IP Address?</a></li>
<li><a href="#sealedsender">Does Delta Chat support “Sealed Sender”?</a></li>
<li><a href="#pfs">Delta Chat 是否支持完美前向保密?</a></li>
<li><a href="#pqc">Does Delta Chat support Post-Quantum-Cryptography?</a></li>
@@ -185,7 +187,8 @@ If you add each other to <a href="#groups">groups</a>, end-to-end encryption wil
<p>As being a private messenger,
only friends and family you <a href="#howtoe2ee">share your QR code or invite link with</a> can write to you.</p>
<p>Your friends may share your contact with other friends, this appears as a <strong>request</strong>.</p>
<p>Your friends may share your contact with other friends,
this appears as <b style="border: 1px solid currentColor; padding: 0 3px; font-size:90%">Request</b></p>
<ul>
<li>
@@ -223,15 +226,10 @@ and can tap it to start chatting with the first contact.</p>
</h3>
<ul>
<li>
<p>是的。 Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
<p>是的。 Images, videos, files, voice messages etc. can be sent using the <img style="vertical-align:middle; width:1.0em; margin:1px" src="../paperclip.png" alt="Paperclip" /> <strong>Attachment-</strong>
or <img style="vertical-align:middle; width:0.8em; margin:1px" src="../mic.png" alt="Microphone" /> <strong>Voice Message</strong> buttons</p>
</li>
<li>
<p>为了提高性能,默认情况下会对图像进行优化并以较小的尺寸发送,但您也可以将其作为 “文件 “发送,以保留原始图像。</p>
</li>
</ul>
<p>为了提高性能,默认情况下会对图像进行优化并以较小的尺寸发送,但您也可以将其作为 “文件 “发送,以保留原始图像。</p>
<h3 id="multiple-accounts">
@@ -262,14 +260,9 @@ and uses the server only to relay messages.</p>
</h3>
<ul>
<li>
<p>您可以在设置中添加个人资料图片。如果您给您的联系人发消息或者通过二维码添加他们,他们会自动看到您的个人资料图片。</p>
</li>
<li>
<p>出于隐私原因,在您向他们发送消息之前,没有人会看到您的个人资料照片。</p>
</li>
</ul>
<p>您可以在设置中添加个人资料图片。如果您给您的联系人发消息或者通过二维码添加他们,他们会自动看到您的个人资料图片。</p>
<p>出于隐私原因,在您向他们发送消息之前,没有人会看到您的个人资料照片。</p>
<h3 id="signature">
@@ -375,22 +368,18 @@ and others will as well not always see that you are “online”.</p>
<ul>
<li>
<p><strong>One tick</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick1.png" alt="" />
means that the message was sent successfully to your provider.</p>
means that the message was sent successfully to the <a href="#relays">relay</a>.</p>
</li>
<li>
<p><strong>Two ticks</strong> <img style="vertical-align:middle; width:1.5em; margin:1px" src="../tick2.png" alt="" />
mean that at least one recipient’s device
reported back to having received the message.</p>
</li>
<li>
<p>Recipients may have disabled read-receipts,
so even if you see only one tick, the message may have been read.</p>
</li>
<li>
<p>The other way round, two ticks do not automatically mean
that a human has read or understood the message ;)</p>
indicate your contact has read the message.</p>
</li>
</ul>
<p>In <a href="#groups">groups</a> the second tick means that at least one member has reported back having read the message.</p>
<p>You will only get the second tick if both you and one of the recipients who read the message
has <strong>Settings → Chats → Read Receipts</strong> enabled.</p>
<h3 id="edit">
@@ -456,10 +445,9 @@ the (anyway encrypted) messages may take longer to get deleted from their server
</h3>
<ul>
<li>若要节省设备上的存储空间,可以开启自动删除旧消息。</li>
<li>找到“聊天与媒体”设置中的“从设备删除旧消息”,在从“一小时后”到“一年后”的一系列选项中选择一个。这样,设备上 <em>所有</em> 比所选择时间长度老的消息将被删除。</li>
</ul>
<p>若要节省设备上的存储空间,可以开启自动删除旧消息</p>
<p>找到“聊天与媒体”设置中的“从设备删除旧消息”,在从“一小时后”到“一年后”的一系列选项中选择一个。这样,设备上 <em>所有</em> 比所选择时间长度老的消息将被删除</p>
<h3 id="remove-account">
@@ -507,9 +495,15 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>从右上角的菜单中选择<strong>新建聊天</strong>,然后选择<strong>新建群组</strong>或在 Android/iOS 上点击相应的按钮。</li>
<li>在随后的屏幕上,选择<strong>群组成员</strong>并起一个<strong>群组名称</strong>。您也可以选择一个<strong>群组头像</strong>。</li>
<li>当您在群组中发送<strong>第一条消息</strong>时,所有成员都会被告知新群组的信息并可以在该群组中应答(只要您不在群组中发送第一条消息,那么群组对成员就是不可见的)。</li>
<li>
<p>从右上角的菜单中选择<strong>新建聊天</strong>,然后选择<strong>新建群组</strong>或在 Android/iOS 上点击相应的按钮。</p>
</li>
<li>
<p>在随后的屏幕上,选择<strong>群组成员</strong>并起一个<strong>群组名称</strong>。您也可以选择一个<strong>群组头像</strong>。</p>
</li>
<li>
<p>当您在群组中发送<strong>第一条消息</strong>时,所有成员都会被告知新群组的信息并可以在该群组中应答(只要您不在群组中发送第一条消息,那么群组对成员就是不可见的)。</p>
</li>
</ul>
<h3 id="addmembers">
@@ -520,11 +514,10 @@ and <a href="#edit">delete their own messages</a> from all member’s devices.</
</h3>
<ul>
<li>
<p>All group members have the <strong>same rights</strong>.
<p>All group members have the <strong>same rights</strong>.
For this reason, everyone can delete any member or add new ones.</p>
</li>
<ul>
<li>
<p>To <strong>add or delete members</strong>, tap the group name in the chat and select the member to add or remove.</p>
</li>
@@ -552,9 +545,7 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>由于您不再是群组成员,您无法将自己加入到群组中。但是,问题不大,只需在普通聊天中请求其他群组成员将您重新加入即可。</li>
</ul>
<p>由于您不再是群组成员,您无法将自己加入到群组中。但是,问题不大,只需在普通聊天中请求其他群组成员将您重新加入即可。</p>
<h3 id="我不想再收到某个群组中的消息了">
@@ -565,13 +556,10 @@ However, since groups are <a href="#groups">meant for trusted people</a>, avoid
</h3>
<ul>
<li>
<p>从成员列表中删除自己,或者删除整个聊天。如果您之后想再加入该群组,请让其他群组成员添加您。</p>
</li>
<li>
<p>另外,您也可以“静音”群组——这样做意味着您会收到所有消息并且仍可以编写消息,但不会再收到任何新消息的通知。</p>
</li>
<li>从成员列表中删除自己,或者删除整个聊天。如果您之后想再加入该群组,请让其他群组成员添加您。</li>
</ul>
<p>另外,您也可以“静音”群组——这样做意味着您会收到所有消息并且仍可以编写消息,但不会再收到任何新消息的通知。</p>
<h3 id="cloning-a-group">
@@ -597,6 +585,21 @@ or right-click the group in the chat list (Desktop).</p>
<p>The new group is <strong>fully independent</strong> from the original,
which continues to work as before.</p>
<h3 id="how-many-members-can-participate-in-a-single-group">
How many members can participate in a single group? <a href="#how-many-members-can-participate-in-a-single-group" class="anchor"></a>
</h3>
<p>There is no strict technical limit,
but more than 150 is not recommended.</p>
<p>As groups get larger, they can become socially unstable and may need a hierarchy -
where Delta Chat is a private messenger for chatting with <a href="#groups">equal rights</a>.
See <a href="https://en.wikipedia.org/wiki/Dunbar%27s_number">Dunbar’s number</a> for more insights.</p>
<h2 id="webxdc">
@@ -882,7 +885,7 @@ Welcome to the power of the interoperable chatmail relay network :)</p>
<p>仔细检查两台设备是否在<strong>同一个 Wi-Fi 或网络中</strong></p>
</li>
<li>
<p>在 <strong>Windows</strong> 上,转到<strong>控制面板 / 网络和 Internet</strong>
<p>在 <strong>Windows</strong> 上,转到”控制面板 / 网络和 Internet”
并确保<strong>专用网络</strong>被选为“网络配置文件类型”
(传输后,你可以更改回原始值)</p>
</li>
@@ -967,10 +970,10 @@ Welcome to the power of the interoperable chatmail relay network :)</p>
</h2>
<h3 id="experimental-features">
<h3 id="experiments">
Experimental Features <a href="#experimental-features" class="anchor"></a>
Experimental Features <a href="#experiments" class="anchor"></a>
</h3>
@@ -1006,7 +1009,7 @@ you can configure relays at At <strong>Settings → Advanced → Relays</strong>
<li>
<p>You can <strong>add</strong> a relay by scanning its QR code;
<a href="https://chatmail.at/relays">https://chatmail.at/relays</a> shows some known ones.
If you have multiple relays, your will receive messages on all of them.</p>
If you have multiple relays, you will receive messages on all of them.</p>
</li>
<li>
<p>The <strong>default</strong> defines the one where your chat partners send future messages to.</p>
@@ -1129,9 +1132,7 @@ weekly statistics will be automatically sent to a bot.</p>
</h3>
<ul>
<li>请参阅 <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Delta Chat 中使用的标准</a>。</li>
</ul>
<p>请参阅 <a href="https://github.com/chatmail/core/blob/main/standards.md#standards-used-in-delta-chat">Delta Chat 中使用的标准</a>。</p>
<h2 id="e2ee">
@@ -1160,6 +1161,10 @@ weekly statistics will be automatically sent to a bot.</p>
<li>
<p><a href="https://autocrypt.org">Autocrypt</a> is used for automatically
用于在联系人和群聊的所有成员之间自动建立端到端加密。</p>
</li>
<li>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption and forward secrecy.</p>
</li>
<li>
<p><a href="https://github.com/chatmail/core/blob/main/spec.md#attaching-a-contact-to-a-message">将联系人分享到聊天中
@@ -1341,12 +1346,10 @@ Instead, all group metadata is end-to-end encrypted and stored on end-user devic
<p>Servers can therefore only see:</p>
<ul>
<li>the sender and receiver addresses</li>
<li>and the message size.</li>
<li>Sender and receiver addresses, randomly generated by default</li>
<li>Message size</li>
</ul>
<p>By default, the addresses are randomly generated.</p>
<p>All other message, contact and group metadata resides in the end-to-end encrypted part of messages.</p>
<h3 id="device-seizure">
@@ -1367,6 +1370,32 @@ with the knowledge that all their data, along with all metadata, will be deleted
Moreover, if a device is seized then chat contacts using short-lived profiles
can not be identified easily.</p>
<h3 id="who-sees-my-ip-address">
Who sees my IP Address? <a href="#who-sees-my-ip-address" class="anchor"></a>
</h3>
<p>The used <a href="#relays">relay</a> needs to know your IP Address,
as well as sometimes your contact’s devices if you have a <a href="#experiments">call</a>
or use <a href="#webxdc">apps</a> together.</p>
<p>IP Addresses are needed for connectivity and efficiency.
They are neither persisted nor exposed.
Note that the IP Address
is not like a detailed address you give to a delivery service,
but much more coarse, often defining region or country only.</p>
<p>As this is just how the internet and other messengers work by default,
we do not offer options here or ask upfront questions.</p>
<p>If you see your IP Address as a security or privacy risk,
we recommend to use a VPN, in combination with system lockdown mode.
Hunting down options in all apps on your system will leave gaps.
For example, tapping a link exposes IP Addresses to unknown parties and is the by far larger risk here.</p>
<h3 id="sealedsender">
@@ -1396,7 +1425,7 @@ but an implementation has not been agreed as a priority yet.</p>
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat today doesn’t support Perfect Forward Secrecy (PFS).
This means that if your private decryption key is leaked,
@@ -1407,12 +1436,9 @@ Otherwise, someone obtaining your decryption keys
is typically also able to get all your non-deleted messages
and doesn’t even need to decrypt any previously collected messages.</p>
<p>We designed a Forward Secrecy approach that withstood
initial examination from some cryptographers and implementation experts
but is pending a more formal write up
to ascertain it reliably works in federated messaging and with multi-device usage,
before it could be implemented in <a href="https://github.com/chatmail/core">chatmail core</a>,
which would make it available in all <a href="https://chatmail.at/clients">chatmail clients</a>.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will provide reliable deletion (forward secrecy) through automatic key rotation.
This approach is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="pqc">
@@ -1422,12 +1448,13 @@ which would make it available in all <a href="https://chatmail.at/clients">chatm
</h3>
<p>No, not yet.</p>
<p>Not yet, but it’s coming with <a href="https://autocrypt2.org">Autocrypt v2</a>.</p>
<p>Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
We aim to add PQC support in <a href="https://github.com/chatmail/core">chatmail core</a> after the draft is finalized at the IETF
in collaboration with other OpenPGP implementers.</p>
<p><a href="https://autocrypt2.org">Autocrypt v2</a>, scheduled for full implementation in 2026,
will bring post-quantum resistant encryption to protect against quantum computer attacks.
Delta Chat uses the Rust OpenPGP library <a href="https://github.com/rpgp/rpgp">rPGP</a>
which supports the latest <a href="https://datatracker.ietf.org/doc/draft-ietf-openpgp-pqc/">IETF Post-Quantum-Cryptography OpenPGP draft</a>.
The implementation is specified in the <a href="https://datatracker.ietf.org/doc/draft-autocrypt-openpgp-v2-cert/">Autocrypt v2 OpenPGP Certificates</a> draft.</p>
<h3 id="how-can-i-manually-check-encryption-information">
@@ -1596,33 +1623,6 @@ Google Play Store, F-Droid, Huawei App Gallery, iOS and macOS App Store, Microso
按时间顺序排列:</p>
<ul>
<li>
<p><a href="https://nextleap.eu">NEXTLEAP</a>欧盟项目资助了以下研究和实施工作:在 2017 年和 2018 年实施的验证组和设置联系协议和通过 <a href="https://autocrypt.org">Autocrypt</a>整合了端到端加密。</p>
</li>
<li>
<p>在<a href="https://opentechfund.org">开放技术基金</a> 2018/2019 年提供的第一笔赠款(约 20 万美元)期间,我们显著改善了安卓应用,发布了第一个桌面测试版,并根据人权方面的用户体验研究进行了功能开发,请参阅我们的结论<a href="https://delta.chat/en/2019-07-19-uxreport">《需求发现与用户体验报告》</a>。2019/2020 年的第二笔赠款(约 30 万美元)对发布 Delta/iOS 版本,将核心库转换到 Rust ,以及为所有平台开发新功能提供了帮助。</p>
</li>
<li>
<p><a href="https://nlnet.nl/">NLnet 基金会</a> 2019/2020 年拨款 4.6 万欧元,用于完成 Rust/Python 绑定并建立聊天机器人生态系统。</p>
</li>
<li>
<p>In 2021 we received further EU funding for two Next-Generation-Internet
proposals, namely for <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - email provider portability directory</a> (~97K EUR) and <a href="https://nlnet.nl/project/EmailPorting/">AEAP - email address porting</a> (~90K EUR) which resulted in better multi-profile support, improved QR-code contact and group setups and many networking improvements on all platforms.</p>
</li>
<li>
<p>From End 2021 till March 2023 we received <em>Internet Freedom</em> funding (500K USD) from the
U.S. Bureau of Democracy, Human Rights and Labor (DRL).
This funding supported our long-running goals to make Delta Chat more usable
and compatible with a wide range of email servers world-wide, and more resilient and secure
in places often affected by internet censorship and shutdowns.</p>
</li>
<li>
<p>2023-2024 年,我们成功完成了 OTF 资助的
<a href="https://www.opentech.fund/projects-we-support/supported-projects/secure-chat-mail-with-delta-chat/">安全 Chatmail 项目</a>,
使我们能够引入保证的加密,
创建一个 <a href="https://delta.chat/chatmail">Chatmail 服务器网络</a>,
并在 2024 年 4 月起发布的所有应用中提供“即时入职”。</p>
</li>
<li>
<p>在 2023 年和 2024 年,我们的 <a href="https://nlnet.nl/project/WebXDC-Push/">WebXDC PUSH</a> 工作已在下一代互联网 (NGI) 中获得认可,
并与致力于
@@ -1632,6 +1632,18 @@ in places often affected by internet censorship and shutdowns.</p>
<a href="https://nlnet.nl/project/DeltaTauri/">DeltaTauri</a> 的合作伙伴合作。
所有这些项目都已部分完成或将在 2025 年初完成。</p>
</li>
<li>
<p>在 2021 年,我们从两项下一代互联网提案收到了欧盟的进一步资助,即 <a href="https://dapsi.ngi.eu/hall-of-fame/eppd/">EPPD - 电子邮件提供商可移植性目录</a>(约 9.7 万欧元)和 <a href="https://nlnet.nl/project/EmailPorting/">AEAP - 电子邮件地址移植</a>(约 9 万欧元)。这带来了更好的多账户支持,改进的二维码联系人和群组设置,和所有平台上的多处网络改进。</p>
</li>
<li>
<p><a href="https://nlnet.nl/">NLnet 基金会</a> 2019/2020 年拨款 4.6 万欧元,用于完成 Rust/Python 绑定并建立聊天机器人生态系统。</p>
</li>
<li>
<p>在<a href="https://opentechfund.org">开放技术基金</a> 2018/2019 年提供的第一笔赠款(约 20 万美元)期间,我们显著改善了安卓应用,发布了第一个桌面测试版,并根据人权方面的用户体验研究进行了功能开发,请参阅我们的结论<a href="https://delta.chat/en/2019-07-19-uxreport">《需求发现与用户体验报告》</a>。2019/2020 年的第二笔赠款(约 30 万美元)对发布 Delta/iOS 版本,将核心库转换到 Rust ,以及为所有平台开发新功能提供了帮助。</p>
</li>
<li>
<p><a href="https://nextleap.eu">NEXTLEAP</a>欧盟项目资助了以下研究和实施工作:在 2017 年和 2018 年实施的验证组和设置联系协议和通过 <a href="https://autocrypt.org">Autocrypt</a>整合了端到端加密。</p>
</li>
<li>
<p>我们有时会收到个人的一次性捐款。 例如,2021 年,一位慷慨的人士以 “继续保持良好的发展态势!”为主题通过银行向我们捐赠了4千欧元💜。 我们用这些钱来资助发展活动或支付不容易预测或从公共基金中报销的临时费用。收到更多的捐款也有助于我们作为一个贡献者社区变得更加独立和长期可持续。</p>
+72 -11
View File
@@ -53,6 +53,11 @@ public class Rpc {
return transport.callForResult(new TypeReference<Event>(){}, "get_next_event");
}
/** Waits for at least one event and return a batch of events. */
public java.util.List<Event> getNextEventBatch() throws RpcException {
return transport.callForResult(new TypeReference<java.util.List<Event>>(){}, "get_next_event_batch");
}
public Integer addAccount() throws RpcException {
return transport.callForResult(new TypeReference<Integer>(){}, "add_account");
}
@@ -211,11 +216,11 @@ public class Rpc {
}
/**
* Set configuration values from a QR code. (technically from the URI that is stored in the qrcode)
* Before this function is called, `checkQr()` should confirm the type of the
* QR code is `account` or `webrtcInstance`.
* Set configuration values from a QR code (technically from the URI stored in it).
* Before this function is called, `check_qr()` should be used to get the QR code type.
* <p>
* Internally, the function will call dc_set_config() with the appropriate keys,
* "DCACCOUNT:" and "DCLOGIN:" QR codes configure the account, but I/O mustn't be started for
* such QR codes, consider using [`Self::add_transport_from_qr`] which also restarts I/O.
*/
public void setConfigFromQr(Integer accountId, String qrContent) throws RpcException {
transport.call("set_config_from_qr", mapper.valueToTree(accountId), mapper.valueToTree(qrContent));
@@ -234,6 +239,11 @@ public class Rpc {
return transport.callForResult(new TypeReference<java.util.Map<String, String>>(){}, "batch_get_config", mapper.valueToTree(accountId), mapper.valueToTree(keys));
}
/** Returns all `ui.*` config keys that were set by the UI. */
public java.util.List<String> getAllUiConfigKeys(Integer accountId) throws RpcException {
return transport.callForResult(new TypeReference<java.util.List<String>>(){}, "get_all_ui_config_keys", mapper.valueToTree(accountId));
}
public void setStockStrings(java.util.Map<String, String> strings) throws RpcException {
transport.call("set_stock_strings", mapper.valueToTree(strings));
}
@@ -449,11 +459,11 @@ public class Rpc {
* Delete a chat.
* <p>
* Messages are deleted from the device and the chat database entry is deleted.
* After that, the event #DC_EVENT_MSGS_CHANGED is posted.
* After that, a `MsgsChanged` event is emitted.
* Messages are deleted from the server in background.
* <p>
* Things that are _not done_ implicitly:
* <p>
* - Messages are **not deleted from the server**.
* - The chat or the contact is **not blocked**, so new messages from the user/the group may appear as a contact request
* and the user may create the chat again.
* - **Groups are not left** - this would
@@ -677,7 +687,8 @@ public class Rpc {
* Set group name.
* <p>
* If the group is already _promoted_ (any message was sent to the group),
* all group members are informed by a special status message that is sent automatically by this function.
* or if this is a brodacast channel,
* all members are informed by a special status message that is sent automatically by this function.
* <p>
* Sends out #DC_EVENT_CHAT_MODIFIED and #DC_EVENT_MSGS_CHANGED if a status message was sent.
*/
@@ -685,11 +696,37 @@ public class Rpc {
transport.call("set_chat_name", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(newName));
}
/**
* Set group or broadcast channel description.
* <p>
* If the group is already _promoted_ (any message was sent to the group),
* or if this is a brodacast channel,
* all members are informed by a special status message that is sent automatically by this function.
* <p>
* Sends out #DC_EVENT_CHAT_MODIFIED and #DC_EVENT_MSGS_CHANGED if a status message was sent.
* <p>
* See also [`Self::get_chat_description`] / `getChatDescription()`.
*/
public void setChatDescription(Integer accountId, Integer chatId, String description) throws RpcException {
transport.call("set_chat_description", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(description));
}
/**
* Load the chat description from the database.
* <p>
* UIs show this in the profile page of the chat,
* it is settable by [`Self::set_chat_description`] / `setChatDescription()`.
*/
public String getChatDescription(Integer accountId, Integer chatId) throws RpcException {
return transport.callForResult(new TypeReference<String>(){}, "get_chat_description", mapper.valueToTree(accountId), mapper.valueToTree(chatId));
}
/**
* Set group profile image.
* <p>
* If the group is already _promoted_ (any message was sent to the group),
* all group members are informed by a special status message that is sent automatically by this function.
* or if this is a brodacast channel,
* all members are informed by a special status message that is sent automatically by this function.
* <p>
* Sends out #DC_EVENT_CHAT_MODIFIED and #DC_EVENT_MSGS_CHANGED if a status message was sent.
* <p>
@@ -733,11 +770,26 @@ public class Rpc {
return transport.callForResult(new TypeReference<Integer>(){}, "add_device_message", mapper.valueToTree(accountId), mapper.valueToTree(label), mapper.valueToTree(msg));
}
/**
* Mark all messages in all chats as _noticed_.
* Skips messages from blocked contacts, but does not skip messages in muted chats.
* <p>
* _Noticed_ messages are no longer _fresh_ and do not count as being unseen
* but are still waiting for being marked as "seen" using markseen_msgs()
* (read receipts aren't sent for noticed messages).
* <p>
* Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED.
* See also markseen_msgs().
*/
public void marknoticedAllChats(Integer accountId) throws RpcException {
transport.call("marknoticed_all_chats", mapper.valueToTree(accountId));
}
/**
* Mark all messages in a chat as _noticed_.
* _Noticed_ messages are no longer _fresh_ and do not count as being unseen
* but are still waiting for being marked as "seen" using markseen_msgs()
* (IMAP/MDNs is not done for noticed messages).
* (read receipts aren't sent for noticed messages).
* <p>
* Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED.
* See also markseen_msgs().
@@ -893,6 +945,15 @@ public class Rpc {
return transport.callForResult(new TypeReference<MessageInfo>(){}, "get_message_info_object", mapper.valueToTree(accountId), mapper.valueToTree(messageId));
}
/**
* Returns count of read receipts on message.
* <p>
* This view count is meant as a feedback measure for the channel owner only.
*/
public Integer getMessageReadReceiptCount(Integer accountId, Integer messageId) throws RpcException {
return transport.callForResult(new TypeReference<Integer>(){}, "get_message_read_receipt_count", mapper.valueToTree(accountId), mapper.valueToTree(messageId));
}
/** Returns contacts that sent read receipts and the time of reading. */
public java.util.List<MessageReadReceipt> getMessageReadReceipts(Integer accountId, Integer messageId) throws RpcException {
return transport.callForResult(new TypeReference<java.util.List<MessageReadReceipt>>(){}, "get_message_read_receipts", mapper.valueToTree(accountId), mapper.valueToTree(messageId));
@@ -1286,8 +1347,8 @@ public class Rpc {
}
/** Starts an outgoing call. */
public Integer placeOutgoingCall(Integer accountId, Integer chatId, String placeCallInfo) throws RpcException {
return transport.callForResult(new TypeReference<Integer>(){}, "place_outgoing_call", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(placeCallInfo));
public Integer placeOutgoingCall(Integer accountId, Integer chatId, String placeCallInfo, Boolean hasVideo) throws RpcException {
return transport.callForResult(new TypeReference<Integer>(){}, "place_outgoing_call", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(placeCallInfo), mapper.valueToTree(hasVideo));
}
/** Accepts an incoming call. */
@@ -2,7 +2,7 @@
package chat.delta.rpc.types;
/**
* cheaper version of fullchat, omits: - contacts - contact_ids - fresh_message_counter - ephemeral_timer - self_in_group - was_seen_recently - can_send
* cheaper version of fullchat, omits: - contact_ids - fresh_message_counter - ephemeral_timer - self_in_group - was_seen_recently - can_send
* <p>
* used when you only need the basic metadata of a chat like type, name, profile picture
*/
@@ -2,7 +2,7 @@
package chat.delta.rpc.types;
public class CallInfo {
/** True if SDP offer has a video. */
/** True if the call is started as a video call. */
public Boolean hasVideo;
/**
* SDP offer.
@@ -38,7 +38,7 @@ public class Contact {
* <p>
* UI should display the information in the contact's profile as follows:
* <p>
* - If `verifierId` != 0, display text "Introduced by ..." with the name and address of the contact formatted by `name_and_addr`/`nameAndAddr`. Prefix the text by a green checkmark.
* - If `verifierId` != 0, display text "Introduced by ..." with the name of the contact. Prefix the text by a green checkmark.
* <p>
* - If `verifierId` == 0 and `isVerified` != 0, display "Introduced" prefixed by a green checkmark.
* <p>
@@ -412,7 +412,9 @@ public abstract class EventType {
/**
* One or more transports has changed.
* <p>
* This event is used for tests to detect when transport synchronization messages arrives. UIs don't need to use it, it is unlikely that user modifies transports on multiple devices simultaneously.
* UI should update the list.
* <p>
* This event is emitted when transport synchronization messages arrives, but not when the UI modifies the transport list by itself.
*/
public static class TransportsModified extends EventType {
}
@@ -7,7 +7,6 @@ public class FullChat {
public ChatType chatType;
public String color;
public java.util.List<Integer> contactIds;
public java.util.List<Contact> contacts;
public Integer ephemeralTimer;
public Integer freshMessageCounter;
public Integer id;
@@ -12,6 +12,7 @@ public class Message {
public String error;
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET)
public String file;
/** The size of the file in bytes, if applicable. If message is a pre-message, then this is the size of the file to be downloaded. */
public Integer fileBytes;
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET)
public String fileMime;
@@ -22,6 +22,7 @@ public abstract class MessageLoadResult {
public String error;
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET)
public String file;
/** The size of the file in bytes, if applicable. If message is a pre-message, then this is the size of the file to be downloaded. */
public Integer fileBytes;
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET)
public String fileMime;
@@ -4,6 +4,7 @@ package chat.delta.rpc.types;
public enum SystemMessageType {
Unknown,
GroupNameChanged,
GroupDescriptionChanged,
GroupImageChanged,
MemberAddedToGroup,
MemberRemovedFromGroup,
@@ -2,63 +2,92 @@ package com.b44t.messenger;
public class DcAccounts {
public DcAccounts(String dir) {
accountsCPtr = createAccountsCPtr(dir);
public DcAccounts(String dir, DcEventChannel channel) {
accountsCPtr = createAccountsCPtr(dir, channel);
if (accountsCPtr == 0) throw new RuntimeException("createAccountsCPtr() returned null pointer");
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unref();
}
public void unref() {
if (accountsCPtr != 0) {
unrefAccountsCPtr();
accountsCPtr = 0;
}
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unref();
public DcEventEmitter getEventEmitter() {
return new DcEventEmitter(getEventEmitterCPtr());
}
public DcJsonrpcInstance getJsonrpcInstance() {
return new DcJsonrpcInstance(getJsonrpcInstanceCPtr());
}
public void startIo() {
for (int accountId : getAll()) {
DcContext acc = getAccount(accountId);
if (acc.isEnabled()) {
acc.startIo();
}
}
}
;
public void unref() {
if (accountsCPtr != 0) {
unrefAccountsCPtr();
accountsCPtr = 0;
}
}
public DcEventEmitter getEventEmitter () { return new DcEventEmitter(getEventEmitterCPtr()); }
public DcJsonrpcInstance getJsonrpcInstance () { return new DcJsonrpcInstance(getJsonrpcInstanceCPtr()); }
public void startIo () {
for (int accountId : getAll()) {
DcContext acc = getAccount(accountId);
if (acc.isEnabled()) {
acc.startIo();
}
}
};
public native void startIo2 ();
public native void stopIo ();
public native void maybeNetwork ();
public native void setPushDeviceToken (String token);
public native boolean backgroundFetch (int timeoutSeconds);
public native void stopBackgroundFetch ();
public native int migrateAccount (String dbfile);
public native boolean removeAccount (int accountId);
public native int[] getAll ();
public DcContext getAccount (int accountId) { return new DcContext(getAccountCPtr(accountId)); }
public DcContext getSelectedAccount () { return new DcContext(getSelectedAccountCPtr()); }
public native boolean selectAccount (int accountId);
// working with raw c-data
private long accountsCPtr; // CAVE: the name is referenced in the JNI
private native long createAccountsCPtr (String dir);
private native void unrefAccountsCPtr ();
private native long getEventEmitterCPtr ();
private native long getJsonrpcInstanceCPtr ();
private native long getAccountCPtr (int accountId);
private native long getSelectedAccountCPtr ();
public boolean isAllChatmail() {
for (int accountId : getAll()) {
DcContext dcContext = getAccount(accountId);
if (!dcContext.isChatmail()) {
return false;
}
}
return true;
public native void startIo2();
public native void stopIo();
public native void maybeNetwork();
public native void setPushDeviceToken(String token);
public native boolean backgroundFetch(int timeoutSeconds);
public native void stopBackgroundFetch();
public native int migrateAccount(String dbfile);
public native boolean removeAccount(int accountId);
public native int[] getAll();
public DcContext getAccount(int accountId) {
return new DcContext(getAccountCPtr(accountId));
}
public DcContext getSelectedAccount() {
return new DcContext(getSelectedAccountCPtr());
}
public native boolean selectAccount(int accountId);
// working with raw c-data
private long accountsCPtr; // CAVE: the name is referenced in the JNI
private native long createAccountsCPtr(String dir, DcEventChannel channel);
private native void unrefAccountsCPtr();
private native long getEventEmitterCPtr();
private native long getJsonrpcInstanceCPtr();
private native long getAccountCPtr(int accountId);
private native long getSelectedAccountCPtr();
public boolean isAllChatmail() {
for (int accountId : getAll()) {
DcContext dcContext = getAccount(accountId);
if (!dcContext.isChatmail()) {
return false;
}
}
return true;
}
}
@@ -2,31 +2,35 @@ package com.b44t.messenger;
public class DcBackupProvider {
public DcBackupProvider(long backupProviderCPtr) {
this.backupProviderCPtr = backupProviderCPtr;
public DcBackupProvider(long backupProviderCPtr) {
this.backupProviderCPtr = backupProviderCPtr;
}
public boolean isOk() {
return backupProviderCPtr != 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unref();
}
public void unref() {
if (backupProviderCPtr != 0) {
unrefBackupProviderCPtr();
backupProviderCPtr = 0;
}
}
public boolean isOk() {
return backupProviderCPtr != 0;
}
public native String getQr();
@Override protected void finalize() throws Throwable {
super.finalize();
unref();
}
public native String getQrSvg();
public void unref() {
if (backupProviderCPtr != 0) {
unrefBackupProviderCPtr();
backupProviderCPtr = 0;
}
}
public native void waitForReceiver();
public native String getQr ();
public native String getQrSvg ();
public native void waitForReceiver ();
// working with raw c-data
private long backupProviderCPtr; // CAVE: the name is referenced in the JNI
// working with raw c-data
private long backupProviderCPtr; // CAVE: the name is referenced in the JNI
private native void unrefBackupProviderCPtr();
private native void unrefBackupProviderCPtr();
}
+92 -59
View File
@@ -1,76 +1,109 @@
package com.b44t.messenger;
import org.thoughtcrime.securesms.util.Util;
public class DcChat {
public static final int DC_CHAT_TYPE_UNDEFINED = 0;
public static final int DC_CHAT_TYPE_SINGLE = 100;
public static final int DC_CHAT_TYPE_GROUP = 120;
public static final int DC_CHAT_TYPE_MAILINGLIST = 140;
public static final int DC_CHAT_TYPE_OUT_BROADCAST = 160;
public static final int DC_CHAT_TYPE_IN_BROADCAST = 165;
public static final int DC_CHAT_TYPE_UNDEFINED = 0;
public static final int DC_CHAT_TYPE_SINGLE = 100;
public static final int DC_CHAT_TYPE_GROUP = 120;
public static final int DC_CHAT_TYPE_MAILINGLIST = 140;
public static final int DC_CHAT_TYPE_OUT_BROADCAST = 160;
public static final int DC_CHAT_TYPE_IN_BROADCAST = 165;
public static final int DC_CHAT_NO_CHAT = 0;
public final static int DC_CHAT_ID_ARCHIVED_LINK = 6;
public final static int DC_CHAT_ID_ALLDONE_HINT = 7;
public final static int DC_CHAT_ID_LAST_SPECIAL = 9;
public static final int DC_CHAT_NO_CHAT = 0;
public static final int DC_CHAT_ID_ARCHIVED_LINK = 6;
public static final int DC_CHAT_ID_ALLDONE_HINT = 7;
public static final int DC_CHAT_ID_LAST_SPECIAL = 9;
public final static int DC_CHAT_VISIBILITY_NORMAL = 0;
public final static int DC_CHAT_VISIBILITY_ARCHIVED = 1;
public final static int DC_CHAT_VISIBILITY_PINNED = 2;
public static final int DC_CHAT_VISIBILITY_NORMAL = 0;
public static final int DC_CHAT_VISIBILITY_ARCHIVED = 1;
public static final int DC_CHAT_VISIBILITY_PINNED = 2;
private int accountId;
private int accountId;
public DcChat(int accountId, long chatCPtr) {
this.accountId = accountId;
this.chatCPtr = chatCPtr;
public DcChat(int accountId, long chatCPtr) {
this.accountId = accountId;
this.chatCPtr = chatCPtr;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefChatCPtr();
chatCPtr = 0;
}
public int getAccountId() {
return accountId;
}
public native int getId();
public native int getType();
public native int getVisibility();
public native String getName();
public native String getMailinglistAddr();
public native String getProfileImage();
public native int getColor();
public native boolean isEncrypted();
public native boolean isUnpromoted();
public native boolean isSelfTalk();
public native boolean isDeviceTalk();
public native boolean canSend();
public native boolean isSendingLocations();
public native boolean isMuted();
public native boolean isContactRequest();
// aliases and higher-level tools
public boolean isMultiUser() {
int type = getType();
return type != DC_CHAT_TYPE_SINGLE;
}
public boolean shallLeaveBeforeDelete(DcContext dcContext) {
if (isInBroadcast()) {
final int[] members = dcContext.getChatContacts(getId());
return Util.contains(members, DcContact.DC_CONTACT_ID_SELF);
} else if (isMultiUser() && isEncrypted() && canSend() && !isOutBroadcast()) {
return true;
}
return false;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefChatCPtr();
chatCPtr = 0;
}
public boolean isMailingList() {
return getType() == DC_CHAT_TYPE_MAILINGLIST;
}
public int getAccountId () { return accountId; }
public native int getId ();
public native int getType ();
public native int getVisibility ();
public native String getName ();
public native String getMailinglistAddr();
public native String getProfileImage ();
public native int getColor ();
public native boolean isEncrypted ();
public native boolean isUnpromoted ();
public native boolean isSelfTalk ();
public native boolean isDeviceTalk ();
public native boolean canSend ();
public native boolean isSendingLocations();
public native boolean isMuted ();
public native boolean isContactRequest ();
public boolean isInBroadcast() {
return getType() == DC_CHAT_TYPE_IN_BROADCAST;
}
public boolean isOutBroadcast() {
return getType() == DC_CHAT_TYPE_OUT_BROADCAST;
}
// aliases and higher-level tools
// working with raw c-data
public boolean isMultiUser() {
int type = getType();
return type != DC_CHAT_TYPE_SINGLE;
}
private long chatCPtr; // CAVE: the name is referenced in the JNI
public boolean isMailingList() {
return getType() == DC_CHAT_TYPE_MAILINGLIST;
}
public boolean isInBroadcast() {
return getType() == DC_CHAT_TYPE_IN_BROADCAST;
}
public boolean isOutBroadcast() {
return getType() == DC_CHAT_TYPE_OUT_BROADCAST;
}
// working with raw c-data
private long chatCPtr; // CAVE: the name is referenced in the JNI
private native void unrefChatCPtr();
public long getChatCPtr () { return chatCPtr; }
private native void unrefChatCPtr();
public long getChatCPtr() {
return chatCPtr;
}
}
@@ -2,45 +2,64 @@ package com.b44t.messenger;
public class DcChatlist {
private int accountId;
private int accountId;
public DcChatlist(int accountId, long chatlistCPtr) {
this.accountId = accountId;
this.chatlistCPtr = chatlistCPtr;
}
public DcChatlist(int accountId, long chatlistCPtr) {
this.accountId = accountId;
this.chatlistCPtr = chatlistCPtr;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefChatlistCPtr();
chatlistCPtr = 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefChatlistCPtr();
chatlistCPtr = 0;
}
public int getAccountId() { return accountId; }
public native int getCnt ();
public native int getChatId (int index);
public DcChat getChat (int index) { return new DcChat(accountId, getChatCPtr(index)); }
public native int getMsgId (int index);
public DcMsg getMsg (int index) { return new DcMsg(getMsgCPtr(index)); }
public DcLot getSummary(int index, DcChat chat) { return new DcLot(getSummaryCPtr(index, chat==null? 0 : chat.getChatCPtr())); }
public int getAccountId() {
return accountId;
}
public class Item {
public DcLot summary;
public int msgId;
public int chatId;
}
public native int getCnt();
public Item getItem(int index) {
Item item = new Item();
item.summary = getSummary(index, null);
item.msgId = getMsgId(index);
item.chatId = getChatId(index);
return item;
}
public native int getChatId(int index);
// working with raw c-data
private long chatlistCPtr; // CAVE: the name is referenced in the JNI
private native void unrefChatlistCPtr();
private native long getChatCPtr (int index);
private native long getMsgCPtr (int index);
private native long getSummaryCPtr (int index, long chatCPtr);
public DcChat getChat(int index) {
return new DcChat(accountId, getChatCPtr(index));
}
public native int getMsgId(int index);
public DcMsg getMsg(int index) {
return new DcMsg(getMsgCPtr(index));
}
public DcLot getSummary(int index, DcChat chat) {
return new DcLot(getSummaryCPtr(index, chat == null ? 0 : chat.getChatCPtr()));
}
public class Item {
public DcLot summary;
public int msgId;
public int chatId;
}
public Item getItem(int index) {
Item item = new Item();
item.summary = getSummary(index, null);
item.msgId = getMsgId(index);
item.chatId = getChatId(index);
return item;
}
// working with raw c-data
private long chatlistCPtr; // CAVE: the name is referenced in the JNI
private native void unrefChatlistCPtr();
private native long getChatCPtr(int index);
private native long getMsgCPtr(int index);
private native long getSummaryCPtr(int index, long chatCPtr);
}
+68 -53
View File
@@ -2,67 +2,82 @@ package com.b44t.messenger;
public class DcContact {
public final static int DC_CONTACT_ID_SELF = 1;
public final static int DC_CONTACT_ID_INFO = 2;
public final static int DC_CONTACT_ID_DEVICE = 5;
public final static int DC_CONTACT_ID_LAST_SPECIAL = 9;
public final static int DC_CONTACT_ID_NEW_CLASSIC_CONTACT= -1; // used by the UI, not valid to the core
public final static int DC_CONTACT_ID_NEW_GROUP = -2; // - " -
public final static int DC_CONTACT_ID_ADD_MEMBER = -3; // - " -
public final static int DC_CONTACT_ID_QR_INVITE = -4; // - " -
public final static int DC_CONTACT_ID_NEW_BROADCAST = -5; // - " -
public final static int DC_CONTACT_ID_ADD_ACCOUNT = -6; // - " -
public final static int DC_CONTACT_ID_NEW_UNENCRYPTED_GROUP = -7; // - " -
public static final int DC_CONTACT_ID_SELF = 1;
public static final int DC_CONTACT_ID_INFO = 2;
public static final int DC_CONTACT_ID_DEVICE = 5;
public static final int DC_CONTACT_ID_LAST_SPECIAL = 9;
public static final int DC_CONTACT_ID_NEW_CLASSIC_CONTACT =
-1; // used by the UI, not valid to the core
public static final int DC_CONTACT_ID_NEW_GROUP = -2; // - " -
public static final int DC_CONTACT_ID_ADD_MEMBER = -3; // - " -
public static final int DC_CONTACT_ID_QR_INVITE = -4; // - " -
public static final int DC_CONTACT_ID_NEW_BROADCAST = -5; // - " -
public static final int DC_CONTACT_ID_ADD_ACCOUNT = -6; // - " -
public static final int DC_CONTACT_ID_NEW_UNENCRYPTED_GROUP = -7; // - " -
public DcContact(long contactCPtr) {
this.contactCPtr = contactCPtr;
public DcContact(long contactCPtr) {
this.contactCPtr = contactCPtr;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefContactCPtr();
contactCPtr = 0;
}
@Override
public boolean equals(Object other) {
if (other == null || !(other instanceof DcContact)) {
return false;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefContactCPtr();
contactCPtr = 0;
}
DcContact that = (DcContact) other;
return this.getId() == that.getId();
}
@Override
public int hashCode() {
return this.getId();
}
@Override
public boolean equals(Object other) {
if (other == null || !(other instanceof DcContact)) {
return false;
}
@Override
public String toString() {
return getAddr();
}
DcContact that = (DcContact) other;
return this.getId()==that.getId();
}
public native int getId();
@Override
public int hashCode() {
return this.getId();
}
public native String getName();
@Override
public String toString() {
return getAddr();
}
public native String getAuthName();
public native int getId ();
public native String getName ();
public native String getAuthName ();
public native String getDisplayName ();
public native String getAddr ();
public native String getProfileImage();
public native int getColor ();
public native String getStatus ();
public native long getLastSeen ();
public native boolean wasSeenRecently();
public native boolean isBlocked ();
public native boolean isVerified ();
public native boolean isKeyContact ();
public native int getVerifierId ();
public native boolean isBot ();
public native String getDisplayName();
// working with raw c-data
private long contactCPtr; // CAVE: the name is referenced in the JNI
private native void unrefContactCPtr();
public native String getAddr();
public native String getProfileImage();
public native int getColor();
public native String getStatus();
public native long getLastSeen();
public native boolean wasSeenRecently();
public native boolean isBlocked();
public native boolean isVerified();
public native boolean isKeyContact();
public native int getVerifierId();
public native boolean isBot();
// working with raw c-data
private long contactCPtr; // CAVE: the name is referenced in the JNI
private native void unrefContactCPtr();
}
+376 -248
View File
@@ -2,287 +2,415 @@ package com.b44t.messenger;
public class DcContext {
public final static int DC_EVENT_INFO = 100;
public final static int DC_EVENT_WARNING = 300;
public final static int DC_EVENT_ERROR = 400;
public final static int DC_EVENT_ERROR_SELF_NOT_IN_GROUP = 410;
public final static int DC_EVENT_MSGS_CHANGED = 2000;
public final static int DC_EVENT_REACTIONS_CHANGED = 2001;
public final static int DC_EVENT_INCOMING_REACTION = 2002;
public final static int DC_EVENT_INCOMING_WEBXDC_NOTIFY = 2003;
public final static int DC_EVENT_INCOMING_MSG = 2005;
public final static int DC_EVENT_MSGS_NOTICED = 2008;
public final static int DC_EVENT_MSG_DELIVERED = 2010;
public final static int DC_EVENT_MSG_FAILED = 2012;
public final static int DC_EVENT_MSG_READ = 2015;
public final static int DC_EVENT_CHAT_MODIFIED = 2020;
public final static int DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED = 2021;
public final static int DC_EVENT_CHAT_DELETED = 2023;
public final static int DC_EVENT_CONTACTS_CHANGED = 2030;
public final static int DC_EVENT_LOCATION_CHANGED = 2035;
public final static int DC_EVENT_CONFIGURE_PROGRESS = 2041;
public final static int DC_EVENT_IMEX_PROGRESS = 2051;
public final static int DC_EVENT_IMEX_FILE_WRITTEN = 2052;
public final static int DC_EVENT_SECUREJOIN_INVITER_PROGRESS = 2060;
public final static int DC_EVENT_SECUREJOIN_JOINER_PROGRESS = 2061;
public final static int DC_EVENT_CONNECTIVITY_CHANGED = 2100;
public final static int DC_EVENT_SELFAVATAR_CHANGED = 2110;
public final static int DC_EVENT_WEBXDC_STATUS_UPDATE = 2120;
public final static int DC_EVENT_WEBXDC_INSTANCE_DELETED = 2121;
public final static int DC_EVENT_WEBXDC_REALTIME_DATA = 2150;
public final static int DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE = 2200;
public final static int DC_EVENT_INCOMING_CALL = 2550;
public final static int DC_EVENT_INCOMING_CALL_ACCEPTED = 2560;
public final static int DC_EVENT_OUTGOING_CALL_ACCEPTED = 2570;
public final static int DC_EVENT_CALL_ENDED = 2580;
public static final int DC_EVENT_INFO = 100;
public static final int DC_EVENT_WARNING = 300;
public static final int DC_EVENT_ERROR = 400;
public static final int DC_EVENT_ERROR_SELF_NOT_IN_GROUP = 410;
public static final int DC_EVENT_MSGS_CHANGED = 2000;
public static final int DC_EVENT_REACTIONS_CHANGED = 2001;
public static final int DC_EVENT_INCOMING_REACTION = 2002;
public static final int DC_EVENT_INCOMING_WEBXDC_NOTIFY = 2003;
public static final int DC_EVENT_INCOMING_MSG = 2005;
public static final int DC_EVENT_MSGS_NOTICED = 2008;
public static final int DC_EVENT_MSG_DELIVERED = 2010;
public static final int DC_EVENT_MSG_FAILED = 2012;
public static final int DC_EVENT_MSG_READ = 2015;
public static final int DC_EVENT_MSG_DELETED = 2016;
public static final int DC_EVENT_CHAT_MODIFIED = 2020;
public static final int DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED = 2021;
public static final int DC_EVENT_CHAT_DELETED = 2023;
public static final int DC_EVENT_CONTACTS_CHANGED = 2030;
public static final int DC_EVENT_LOCATION_CHANGED = 2035;
public static final int DC_EVENT_CONFIGURE_PROGRESS = 2041;
public static final int DC_EVENT_IMEX_PROGRESS = 2051;
public static final int DC_EVENT_IMEX_FILE_WRITTEN = 2052;
public static final int DC_EVENT_SECUREJOIN_INVITER_PROGRESS = 2060;
public static final int DC_EVENT_SECUREJOIN_JOINER_PROGRESS = 2061;
public static final int DC_EVENT_CONNECTIVITY_CHANGED = 2100;
public static final int DC_EVENT_SELFAVATAR_CHANGED = 2110;
public static final int DC_EVENT_WEBXDC_STATUS_UPDATE = 2120;
public static final int DC_EVENT_WEBXDC_INSTANCE_DELETED = 2121;
public static final int DC_EVENT_WEBXDC_REALTIME_DATA = 2150;
public static final int DC_EVENT_ACCOUNTS_BACKGROUND_FETCH_DONE = 2200;
public static final int DC_EVENT_INCOMING_CALL = 2550;
public static final int DC_EVENT_INCOMING_CALL_ACCEPTED = 2560;
public static final int DC_EVENT_OUTGOING_CALL_ACCEPTED = 2570;
public static final int DC_EVENT_CALL_ENDED = 2580;
public static final int DC_EVENT_TRANSPORTS_MODIFIED = 2600;
public final static int DC_IMEX_EXPORT_SELF_KEYS = 1;
public final static int DC_IMEX_IMPORT_SELF_KEYS = 2;
public final static int DC_IMEX_EXPORT_BACKUP = 11;
public final static int DC_IMEX_IMPORT_BACKUP = 12;
public static final int DC_IMEX_EXPORT_SELF_KEYS = 1;
public static final int DC_IMEX_IMPORT_SELF_KEYS = 2;
public static final int DC_IMEX_EXPORT_BACKUP = 11;
public static final int DC_IMEX_IMPORT_BACKUP = 12;
public final static int DC_GCL_VERIFIED_ONLY = 1;
public final static int DC_GCL_ADD_SELF = 2;
public final static int DC_GCL_ADDRESS = 0x04;
public final static int DC_GCL_ARCHIVED_ONLY = 0x01;
public final static int DC_GCL_NO_SPECIALS = 0x02;
public final static int DC_GCL_ADD_ALLDONE_HINT = 0x04;
public final static int DC_GCL_FOR_FORWARDING = 0x08;
public static final int DC_GCL_VERIFIED_ONLY = 1;
public static final int DC_GCL_ADD_SELF = 2;
public static final int DC_GCL_ADDRESS = 0x04;
public static final int DC_GCL_ARCHIVED_ONLY = 0x01;
public static final int DC_GCL_NO_SPECIALS = 0x02;
public static final int DC_GCL_ADD_ALLDONE_HINT = 0x04;
public static final int DC_GCL_FOR_FORWARDING = 0x08;
public final static int DC_GCM_ADDDAYMARKER = 0x01;
public static final int DC_GCM_ADDDAYMARKER = 0x01;
public final static int DC_QR_ASK_VERIFYCONTACT = 200;
public final static int DC_QR_ASK_VERIFYGROUP = 202;
public final static int DC_QR_ASK_JOIN_BROADCAST= 204;
public final static int DC_QR_FPR_OK = 210;
public final static int DC_QR_FPR_MISMATCH = 220;
public final static int DC_QR_FPR_WITHOUT_ADDR = 230;
public final static int DC_QR_ACCOUNT = 250;
public final static int DC_QR_BACKUP2 = 252;
public final static int DC_QR_BACKUP_TOO_NEW = 255;
public final static int DC_QR_WEBRTC = 260;
public final static int DC_QR_PROXY = 271;
public final static int DC_QR_ADDR = 320;
public final static int DC_QR_TEXT = 330;
public final static int DC_QR_URL = 332;
public final static int DC_QR_ERROR = 400;
public final static int DC_QR_WITHDRAW_VERIFYCONTACT = 500;
public final static int DC_QR_WITHDRAW_VERIFYGROUP = 502;
public final static int DC_QR_WITHDRAW_JOINBROADCAST = 504;
public final static int DC_QR_REVIVE_VERIFYCONTACT = 510;
public final static int DC_QR_REVIVE_VERIFYGROUP = 512;
public final static int DC_QR_REVIVE_JOINBROADCAST = 514;
public final static int DC_QR_LOGIN = 520;
public static final int DC_QR_ASK_VERIFYCONTACT = 200;
public static final int DC_QR_ASK_VERIFYGROUP = 202;
public static final int DC_QR_ASK_JOIN_BROADCAST = 204;
public static final int DC_QR_FPR_OK = 210;
public static final int DC_QR_FPR_MISMATCH = 220;
public static final int DC_QR_FPR_WITHOUT_ADDR = 230;
public static final int DC_QR_ACCOUNT = 250;
public static final int DC_QR_BACKUP2 = 252;
public static final int DC_QR_BACKUP_TOO_NEW = 255;
public static final int DC_QR_WEBRTC = 260;
public static final int DC_QR_PROXY = 271;
public static final int DC_QR_ADDR = 320;
public static final int DC_QR_TEXT = 330;
public static final int DC_QR_URL = 332;
public static final int DC_QR_ERROR = 400;
public static final int DC_QR_WITHDRAW_VERIFYCONTACT = 500;
public static final int DC_QR_WITHDRAW_VERIFYGROUP = 502;
public static final int DC_QR_WITHDRAW_JOINBROADCAST = 504;
public static final int DC_QR_REVIVE_VERIFYCONTACT = 510;
public static final int DC_QR_REVIVE_VERIFYGROUP = 512;
public static final int DC_QR_REVIVE_JOINBROADCAST = 514;
public static final int DC_QR_LOGIN = 520;
public final static int DC_SOCKET_AUTO = 0;
public final static int DC_SOCKET_SSL = 1;
public final static int DC_SOCKET_STARTTLS = 2;
public final static int DC_SOCKET_PLAIN = 3;
public static final int DC_SOCKET_AUTO = 0;
public static final int DC_SOCKET_SSL = 1;
public static final int DC_SOCKET_STARTTLS = 2;
public static final int DC_SOCKET_PLAIN = 3;
public final static int DC_SHOW_EMAILS_OFF = 0;
public final static int DC_SHOW_EMAILS_ACCEPTED_CONTACTS = 1;
public final static int DC_SHOW_EMAILS_ALL = 2;
public static final int DC_SHOW_EMAILS_OFF = 0;
public static final int DC_SHOW_EMAILS_ACCEPTED_CONTACTS = 1;
public static final int DC_SHOW_EMAILS_ALL = 2;
public final static int DC_MEDIA_QUALITY_BALANCED = 0;
public final static int DC_MEDIA_QUALITY_WORSE = 1;
public static final int DC_MEDIA_QUALITY_BALANCED = 0;
public static final int DC_MEDIA_QUALITY_WORSE = 1;
public final static int DC_CONNECTIVITY_NOT_CONNECTED = 1000;
public final static int DC_CONNECTIVITY_CONNECTING = 2000;
public final static int DC_CONNECTIVITY_WORKING = 3000;
public final static int DC_CONNECTIVITY_CONNECTED = 4000;
public static final int DC_CONNECTIVITY_NOT_CONNECTED = 1000;
public static final int DC_CONNECTIVITY_CONNECTING = 2000;
public static final int DC_CONNECTIVITY_WORKING = 3000;
public static final int DC_CONNECTIVITY_CONNECTED = 4000;
private static final String CONFIG_ACCOUNT_ENABLED = "ui.enabled";
private static final String CONFIG_MUTE_MENTIONS_IF_MUTED = "ui.mute_mentions_if_muted";
private static final String CONFIG_ACCOUNT_ENABLED = "ui.enabled";
private static final String CONFIG_MUTE_MENTIONS_IF_MUTED = "ui.mute_mentions_if_muted";
// when using DcAccounts, use Rpc.addAccount() instead
public DcContext(String osName, String dbfile) {
contextCPtr = createContextCPtr(osName, dbfile);
// when using DcAccounts, use Rpc.addAccount() instead
public DcContext(String osName, String dbfile) {
contextCPtr = createContextCPtr(osName, dbfile);
}
public DcContext(long contextCPtr) {
this.contextCPtr = contextCPtr;
}
public boolean isOk() {
return contextCPtr != 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
if (contextCPtr != 0) {
unrefContextCPtr();
contextCPtr = 0;
}
}
public DcContext(long contextCPtr) {
this.contextCPtr = contextCPtr;
public native int getAccountId();
// when using DcAccounts, use DcAccounts.getEventEmitter() instead
public DcEventEmitter getEventEmitter() {
return new DcEventEmitter(getEventEmitterCPtr());
}
public native void setStockTranslation(int stockId, String translation);
public native String getBlobdir();
public native String getLastError();
public native void stopOngoingProcess();
public native int isConfigured();
public native boolean open(String passphrase);
public native boolean isOpen();
// when using DcAccounts, use DcAccounts.startIo() instead
public native void startIo();
// when using DcAccounts, use DcAccounts.stopIo() instead
public native void stopIo();
// when using DcAccounts, use DcAccounts.maybeNetwork() instead
public native void maybeNetwork();
public native void setConfig(String key, String value);
public void setConfigInt(String key, int value) {
setConfig(key, Integer.toString(value));
}
public native boolean setConfigFromQr(String qr);
public native String getConfig(String key);
public int getConfigInt(String key) {
return getConfigInt(key, 0);
}
public int getConfigInt(String key, int defValue) {
try {
return Integer.parseInt(getConfig(key));
} catch (Exception e) {
}
return defValue;
}
public boolean isOk() {
return contextCPtr != 0;
}
public native String getInfo();
@Override
protected void finalize() throws Throwable {
super.finalize();
if (contextCPtr != 0) {
unrefContextCPtr();
contextCPtr = 0;
}
}
public native int getConnectivity();
public native int getAccountId ();
public native String getConnectivityHtml();
// when using DcAccounts, use DcAccounts.getEventEmitter() instead
public DcEventEmitter getEventEmitter () { return new DcEventEmitter(getEventEmitterCPtr()); }
public native String initiateKeyTransfer();
public native void setStockTranslation (int stockId, String translation);
public native String getBlobdir ();
public native String getLastError ();
public native void stopOngoingProcess ();
public native int isConfigured ();
public native boolean open (String passphrase);
public native boolean isOpen ();
public native void imex(int what, String dir);
// when using DcAccounts, use DcAccounts.startIo() instead
public native void startIo ();
public native String imexHasBackup(String dir);
// when using DcAccounts, use DcAccounts.stopIo() instead
public native void stopIo ();
public DcBackupProvider newBackupProvider() {
return new DcBackupProvider(newBackupProviderCPtr());
}
// when using DcAccounts, use DcAccounts.maybeNetwork() instead
public native void maybeNetwork ();
public native boolean receiveBackup(String qr);
public native void setConfig (String key, String value);
public void setConfigInt (String key, int value) { setConfig(key, Integer.toString(value)); }
public native boolean setConfigFromQr (String qr);
public native String getConfig (String key);
public int getConfigInt (String key) { return getConfigInt(key, 0); }
public int getConfigInt (String key, int defValue) { try{return Integer.parseInt(getConfig(key));} catch(Exception e) {} return defValue; }
public native String getInfo ();
public native int getConnectivity ();
public native String getConnectivityHtml ();
public native String initiateKeyTransfer ();
public native void imex (int what, String dir);
public native String imexHasBackup (String dir);
public DcBackupProvider newBackupProvider () { return new DcBackupProvider(newBackupProviderCPtr()); }
public native boolean receiveBackup (String qr);
public native boolean mayBeValidAddr (String addr);
public native int lookupContactIdByAddr(String addr);
public native int[] getContacts (int flags, String query);
public native int[] getBlockedContacts ();
public DcContact getContact (int contact_id) { return new DcContact(getContactCPtr(contact_id)); }
public native int createContact (String name, String addr);
public native void blockContact (int id, int block);
public native String getContactEncrInfo (int contact_id);
public native boolean deleteContact (int id);
public native int addAddressBook (String adrbook);
public DcChatlist getChatlist (int listflags, String query, int queryId) { return new DcChatlist(getAccountId(), getChatlistCPtr(listflags, query, queryId)); }
public DcChat getChat (int chat_id) { return new DcChat(getAccountId(), getChatCPtr(chat_id)); }
public native String getChatEncrInfo (int chat_id);
public native void markseenMsgs (int msg_ids[]);
public native void marknoticedChat (int chat_id);
public native void setChatVisibility (int chat_id, int visibility);
public native int getChatIdByContactId (int contact_id);
public native int createChatByContactId(int contact_id);
public native int createGroupChat (String name);
public native int createBroadcastList ();
public native boolean isContactInChat (int chat_id, int contact_id);
public native int addContactToChat (int chat_id, int contact_id);
public native int removeContactFromChat(int chat_id, int contact_id);
public native void setDraft (int chat_id, DcMsg msg/*null=delete*/);
public DcMsg getDraft (int chat_id) { return new DcMsg(getDraftCPtr(chat_id)); }
public native int setChatName (int chat_id, String name);
public native int setChatProfileImage (int chat_id, String name);
public native int[] getChatMsgs (int chat_id, int flags, int marker1before);
public native int[] searchMsgs (int chat_id, String query);
public native int[] getFreshMsgs ();
public native int[] getChatMedia (int chat_id, int type1, int type2, int type3);
public native int[] getChatContacts (int chat_id);
public native int getChatEphemeralTimer (int chat_id);
public native boolean setChatEphemeralTimer (int chat_id, int timer);
public native boolean setChatMuteDuration (int chat_id, long duration);
public native void deleteChat (int chat_id);
public native void blockChat (int chat_id);
public native void acceptChat (int chat_id);
public DcMsg getMsg (int msg_id) { return new DcMsg(getMsgCPtr(msg_id)); }
public native void sendEditRequest (int msg_id, String text);
public native String getMsgInfo (int id);
public native String getMsgHtml (int msg_id);
public native void downloadFullMsg (int msg_id);
public native int getFreshMsgCount (int chat_id);
public native int estimateDeletionCount(boolean from_server, long seconds);
public native void deleteMsgs (int msg_ids[]);
public native void sendDeleteRequest (int msg_ids[]);
public native void forwardMsgs (int msg_ids[], int chat_id);
public native void saveMsgs (int msg_ids[]);
public native boolean resendMsgs (int msg_ids[]);
public native int sendMsg (int chat_id, DcMsg msg);
public native int sendTextMsg (int chat_id, String text);
public native boolean sendWebxdcStatusUpdate(int msg_id, String payload);
public native String getWebxdcStatusUpdates(int msg_id, int last_known_serial);
public native void setWebxdcIntegration (String file);
public native int initWebxdcIntegration(int chat_id);
public native int addDeviceMsg (String label, DcMsg msg);
public native boolean wasDeviceMsgEverAdded(String label);
public DcLot checkQr (String qr) { return new DcLot(checkQrCPtr(qr)); }
public native String getSecurejoinQr (int chat_id);
public native String getSecurejoinQrSvg (int chat_id);
public native String createQrSvg (String payload);
public native int joinSecurejoin (String qr);
public native void sendLocationsToChat (int chat_id, int seconds);
public native boolean isSendingLocationsToChat(int chat_id);
public DcProvider getProviderFromEmailWithDns (String email) { long cptr = getProviderFromEmailWithDnsCPtr(email); return cptr!=0 ? new DcProvider(cptr) : null; }
public native boolean mayBeValidAddr(String addr);
public boolean isEnabled() {
return !"0".equals(getConfig(CONFIG_ACCOUNT_ENABLED));
}
public native int lookupContactIdByAddr(String addr);
public void setEnabled(boolean enabled) {
setConfigInt(CONFIG_ACCOUNT_ENABLED, enabled? 1 : 0);
if (enabled) {
startIo();
} else {
stopIo();
}
}
public native int[] getContacts(int flags, String query);
public boolean isMentionsEnabled() {
return getConfigInt(CONFIG_MUTE_MENTIONS_IF_MUTED) != 1;
}
public native int[] getBlockedContacts();
public void setMentionsEnabled(boolean enabled) {
setConfigInt(CONFIG_MUTE_MENTIONS_IF_MUTED, enabled? 0 : 1);
}
public DcContact getContact(int contact_id) {
return new DcContact(getContactCPtr(contact_id));
}
public String getName() {
String displayname = getConfig("displayname");
if (displayname.isEmpty()) {
displayname = getContact(DcContact.DC_CONTACT_ID_SELF).getAddr();
}
return displayname;
}
public native int createContact(String name, String addr);
public boolean isChatmail() {
return getConfigInt("is_chatmail") == 1;
}
public native void blockContact(int id, int block);
public boolean isMuted() {
return getConfigInt("is_muted") == 1;
}
public native String getContactEncrInfo(int contact_id);
public void setMuted(boolean muted) {
setConfigInt("is_muted", muted? 1 : 0);
}
public native boolean deleteContact(int id);
public void restartIo() {
if (!isEnabled()) return;
stopIo();
public native int addAddressBook(String adrbook);
public DcChatlist getChatlist(int listflags, String query, int queryId) {
return new DcChatlist(getAccountId(), getChatlistCPtr(listflags, query, queryId));
}
public DcChat getChat(int chat_id) {
return new DcChat(getAccountId(), getChatCPtr(chat_id));
}
public native String getChatEncrInfo(int chat_id);
public native void markseenMsgs(int msg_ids[]);
public native void marknoticedChat(int chat_id);
public native void setChatVisibility(int chat_id, int visibility);
public native int getChatIdByContactId(int contact_id);
public native int createChatByContactId(int contact_id);
public native int createGroupChat(String name);
public native int createBroadcastList();
public native boolean isContactInChat(int chat_id, int contact_id);
public native int addContactToChat(int chat_id, int contact_id);
public native int removeContactFromChat(int chat_id, int contact_id);
public native void setDraft(int chat_id, DcMsg msg /*null=delete*/);
public DcMsg getDraft(int chat_id) {
return new DcMsg(getDraftCPtr(chat_id));
}
public native int setChatName(int chat_id, String name);
public native int setChatProfileImage(int chat_id, String name);
public native int[] getChatMsgs(int chat_id, int flags, int marker1before);
public native int[] searchMsgs(int chat_id, String query);
public native int[] getFreshMsgs();
public native int[] getChatMedia(int chat_id, int type1, int type2, int type3);
public native int[] getChatContacts(int chat_id);
public native int getChatEphemeralTimer(int chat_id);
public native boolean setChatEphemeralTimer(int chat_id, int timer);
public native boolean setChatMuteDuration(int chat_id, long duration);
public native void deleteChat(int chat_id);
public native void blockChat(int chat_id);
public native void acceptChat(int chat_id);
public DcMsg getMsg(int msg_id) {
return new DcMsg(getMsgCPtr(msg_id));
}
public native void sendEditRequest(int msg_id, String text);
public native String getMsgInfo(int id);
public native String getMsgHtml(int msg_id);
public native void downloadFullMsg(int msg_id);
public native int getFreshMsgCount(int chat_id);
public native int estimateDeletionCount(boolean from_server, long seconds);
public native void deleteMsgs(int msg_ids[]);
public native void sendDeleteRequest(int msg_ids[]);
public native void forwardMsgs(int msg_ids[], int chat_id);
public native void saveMsgs(int msg_ids[]);
public native boolean resendMsgs(int msg_ids[]);
public native int sendMsg(int chat_id, DcMsg msg);
public native int sendTextMsg(int chat_id, String text);
public native boolean sendWebxdcStatusUpdate(int msg_id, String payload);
public native String getWebxdcStatusUpdates(int msg_id, int last_known_serial);
public native void setWebxdcIntegration(String file);
public native int initWebxdcIntegration(int chat_id);
public native int addDeviceMsg(String label, DcMsg msg);
public native boolean wasDeviceMsgEverAdded(String label);
public DcLot checkQr(String qr) {
return new DcLot(checkQrCPtr(qr));
}
public native String getSecurejoinQr(int chat_id);
public native String getSecurejoinQrSvg(int chat_id);
public native String createQrSvg(String payload);
public native int joinSecurejoin(String qr);
public native void sendLocationsToChat(int chat_id, int seconds);
public native boolean isSendingLocationsToChat(int chat_id);
public DcProvider getProviderFromEmailWithDns(String email) {
long cptr = getProviderFromEmailWithDnsCPtr(email);
return cptr != 0 ? new DcProvider(cptr) : null;
}
public boolean isEnabled() {
return !"0".equals(getConfig(CONFIG_ACCOUNT_ENABLED));
}
public void setEnabled(boolean enabled) {
setConfigInt(CONFIG_ACCOUNT_ENABLED, enabled ? 1 : 0);
if (enabled) {
startIo();
} else {
stopIo();
}
}
/**
* @return true if at least one chat has location streaming enabled
*/
public native boolean setLocation (float latitude, float longitude, float accuracy);
public boolean isMentionsEnabled() {
return getConfigInt(CONFIG_MUTE_MENTIONS_IF_MUTED) != 1;
}
// working with raw c-data
private long contextCPtr; // CAVE: the name is referenced in the JNI
private native long createContextCPtr(String osName, String dbfile);
private native void unrefContextCPtr ();
private native long getEventEmitterCPtr();
public native long createMsgCPtr (int viewtype);
private native long getChatlistCPtr (int listflags, String query, int queryId);
private native long getChatCPtr (int chat_id);
private native long getMsgCPtr (int id);
private native long getDraftCPtr (int id);
private native long getContactCPtr (int id);
private native long checkQrCPtr (String qr);
private native long getProviderFromEmailWithDnsCPtr (String addr);
private native long newBackupProviderCPtr();
public void setMentionsEnabled(boolean enabled) {
setConfigInt(CONFIG_MUTE_MENTIONS_IF_MUTED, enabled ? 0 : 1);
}
public String getName() {
String displayname = getConfig("displayname");
if (displayname.isEmpty()) {
displayname = getConfig("addr");
}
return displayname;
}
public boolean isChatmail() {
return getConfigInt("is_chatmail") == 1;
}
public boolean isMuted() {
return getConfigInt("is_muted") == 1;
}
public void setMuted(boolean muted) {
setConfigInt("is_muted", muted ? 1 : 0);
}
public void restartIo() {
if (!isEnabled()) return;
stopIo();
startIo();
}
/**
* @return true if at least one chat has location streaming enabled
*/
public native boolean setLocation(float latitude, float longitude, float accuracy);
// working with raw c-data
private long contextCPtr; // CAVE: the name is referenced in the JNI
private native long createContextCPtr(String osName, String dbfile);
private native void unrefContextCPtr();
private native long getEventEmitterCPtr();
public native long createMsgCPtr(int viewtype);
private native long getChatlistCPtr(int listflags, String query, int queryId);
private native long getChatCPtr(int chat_id);
private native long getMsgCPtr(int id);
private native long getDraftCPtr(int id);
private native long getContactCPtr(int id);
private native long checkQrCPtr(String qr);
private native long getProviderFromEmailWithDnsCPtr(String addr);
private native long newBackupProviderCPtr();
}
+24 -17
View File
@@ -2,24 +2,31 @@ package com.b44t.messenger;
public class DcEvent {
public DcEvent(long eventCPtr) {
this.eventCPtr = eventCPtr;
}
public DcEvent(long eventCPtr) {
this.eventCPtr = eventCPtr;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefEventCPtr();
eventCPtr = 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefEventCPtr();
eventCPtr = 0;
}
public native int getId ();
public native int getData1Int ();
public native int getData2Int ();
public native String getData2Str ();
public native byte[] getData2Blob();
public native int getAccountId();
public native int getId();
// working with raw c-data
private long eventCPtr; // CAVE: the name is referenced in the JNI
private native void unrefEventCPtr();
public native int getData1Int();
public native int getData2Int();
public native String getData2Str();
public native byte[] getData2Blob();
public native int getAccountId();
// working with raw c-data
private long eventCPtr; // CAVE: the name is referenced in the JNI
private native void unrefEventCPtr();
}
@@ -0,0 +1,30 @@
package com.b44t.messenger;
public class DcEventChannel {
public DcEventChannel() {
eventChannelCPtr = createEventChannelCPtr();
}
@Override
protected void finalize() throws Throwable {
super.finalize();
if (eventChannelCPtr != 0) {
unrefEventChannelCPtr();
eventChannelCPtr = 0;
}
}
public DcEventEmitter getEventEmitter() {
return new DcEventEmitter(getEventEmitterCPtr());
}
// working with raw c-data
private long eventChannelCPtr; // CAVE: the name is referenced in the JNI
private native long createEventChannelCPtr();
private native void unrefEventChannelCPtr();
private native long getEventEmitterCPtr();
}
@@ -2,23 +2,26 @@ package com.b44t.messenger;
public class DcEventEmitter {
public DcEventEmitter(long eventEmitterCPtr) {
this.eventEmitterCPtr = eventEmitterCPtr;
}
public DcEventEmitter(long eventEmitterCPtr) {
this.eventEmitterCPtr = eventEmitterCPtr;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefEventEmitterCPtr();
eventEmitterCPtr = 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefEventEmitterCPtr();
eventEmitterCPtr = 0;
}
public DcEvent getNextEvent () {
long eventCPtr = getNextEventCPtr();
return eventCPtr == 0 ? null : new DcEvent(eventCPtr);
}
public DcEvent getNextEvent() {
long eventCPtr = getNextEventCPtr();
return eventCPtr == 0 ? null : new DcEvent(eventCPtr);
}
// working with raw c-data
private long eventEmitterCPtr; // CAVE: the name is referenced in the JNI
private native long getNextEventCPtr ();
private native void unrefEventEmitterCPtr();
// working with raw c-data
private long eventEmitterCPtr; // CAVE: the name is referenced in the JNI
private native long getNextEventCPtr();
private native void unrefEventEmitterCPtr();
}
@@ -2,20 +2,23 @@ package com.b44t.messenger;
public class DcJsonrpcInstance {
public DcJsonrpcInstance(long jsonrpcInstanceCPtr) {
this.jsonrpcInstanceCPtr = jsonrpcInstanceCPtr;
}
public DcJsonrpcInstance(long jsonrpcInstanceCPtr) {
this.jsonrpcInstanceCPtr = jsonrpcInstanceCPtr;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefJsonrpcInstanceCPtr();
jsonrpcInstanceCPtr = 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefJsonrpcInstanceCPtr();
jsonrpcInstanceCPtr = 0;
}
public native void request(String request);
public native String getNextResponse();
public native void request(String request);
// working with raw c-data
private long jsonrpcInstanceCPtr; // CAVE: the name is referenced in the JNI
private native void unrefJsonrpcInstanceCPtr();
public native String getNextResponse();
// working with raw c-data
private long jsonrpcInstanceCPtr; // CAVE: the name is referenced in the JNI
private native void unrefJsonrpcInstanceCPtr();
}
+27 -20
View File
@@ -2,28 +2,35 @@ package com.b44t.messenger;
public class DcLot {
public final static int DC_TEXT1_DRAFT = 1;
public final static int DC_TEXT1_USERNAME = 2;
public final static int DC_TEXT1_SELF = 3;
public static final int DC_TEXT1_DRAFT = 1;
public static final int DC_TEXT1_USERNAME = 2;
public static final int DC_TEXT1_SELF = 3;
public DcLot(long lotCPtr) {
this.lotCPtr = lotCPtr;
}
public DcLot(long lotCPtr) {
this.lotCPtr = lotCPtr;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefLotCPtr();
lotCPtr = 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefLotCPtr();
lotCPtr = 0;
}
public native String getText1 ();
public native int getText1Meaning();
public native String getText2 ();
public native long getTimestamp ();
public native int getState ();
public native int getId ();
public native String getText1();
// working with raw c-data
private long lotCPtr; // CAVE: the name is referenced in the JNI
private native void unrefLotCPtr();
public native int getText1Meaning();
public native String getText2();
public native long getTimestamp();
public native int getState();
public native int getId();
// working with raw c-data
private long lotCPtr; // CAVE: the name is referenced in the JNI
private native void unrefLotCPtr();
}
@@ -1,14 +1,14 @@
package com.b44t.messenger;
/**
* Contains a list of media entries, their respective positions and ability to move through it.
*/
/** Contains a list of media entries, their respective positions and ability to move through it. */
public class DcMediaGalleryElement {
final int[] mediaMsgs;
int position;
final DcContext context;
public DcMediaGalleryElement(int[] mediaMsgs, int position, DcContext context, boolean leftIsRecent) {
public DcMediaGalleryElement(
int[] mediaMsgs, int position, DcContext context, boolean leftIsRecent) {
this.mediaMsgs = mediaMsgs;
this.position = position;
this.context = context;
@@ -33,7 +33,7 @@ public class DcMediaGalleryElement {
}
public void moveToPosition(int newPosition) {
if(newPosition < 0 || newPosition >= mediaMsgs.length)
if (newPosition < 0 || newPosition >= mediaMsgs.length)
throw new IllegalArgumentException("can't move outside of known area.");
position = newPosition;
}
+298 -232
View File
@@ -1,266 +1,332 @@
package com.b44t.messenger;
import android.text.TextUtils;
import org.json.JSONObject;
import java.io.File;
import java.util.Set;
import org.json.JSONObject;
public class DcMsg {
public final static int DC_MSG_UNDEFINED = 0;
public final static int DC_MSG_TEXT = 10;
public final static int DC_MSG_IMAGE = 20;
public final static int DC_MSG_GIF = 21;
public final static int DC_MSG_STICKER = 23;
public final static int DC_MSG_AUDIO = 40;
public final static int DC_MSG_VOICE = 41;
public final static int DC_MSG_VIDEO = 50;
public final static int DC_MSG_FILE = 60;
public final static int DC_MSG_CALL = 71;
public final static int DC_MSG_WEBXDC = 80;
public final static int DC_MSG_VCARD = 90;
public static final int DC_MSG_UNDEFINED = 0;
public static final int DC_MSG_TEXT = 10;
public static final int DC_MSG_IMAGE = 20;
public static final int DC_MSG_GIF = 21;
public static final int DC_MSG_STICKER = 23;
public static final int DC_MSG_AUDIO = 40;
public static final int DC_MSG_VOICE = 41;
public static final int DC_MSG_VIDEO = 50;
public static final int DC_MSG_FILE = 60;
public static final int DC_MSG_CALL = 71;
public static final int DC_MSG_WEBXDC = 80;
public static final int DC_MSG_VCARD = 90;
public final static int DC_INFO_UNKNOWN = 0;
public final static int DC_INFO_GROUP_NAME_CHANGED = 2;
public final static int DC_INFO_GROUP_IMAGE_CHANGED = 3;
public final static int DC_INFO_MEMBER_ADDED_TO_GROUP = 4;
public final static int DC_INFO_MEMBER_REMOVED_FROM_GROUP = 5;
public final static int DC_INFO_AUTOCRYPT_SETUP_MESSAGE = 6;
public final static int DC_INFO_SECURE_JOIN_MESSAGE = 7;
public final static int DC_INFO_LOCATIONSTREAMING_ENABLED = 8;
public final static int DC_INFO_LOCATION_ONLY = 9;
public final static int DC_INFO_EPHEMERAL_TIMER_CHANGED = 10;
public final static int DC_INFO_PROTECTION_ENABLED = 11;
public final static int DC_INFO_INVALID_UNENCRYPTED_MAIL = 13;
public final static int DC_INFO_WEBXDC_INFO_MESSAGE = 32;
public final static int DC_INFO_CHAT_E2EE = 50;
public static final int DC_INFO_UNKNOWN = 0;
public static final int DC_INFO_GROUP_NAME_CHANGED = 2;
public static final int DC_INFO_GROUP_IMAGE_CHANGED = 3;
public static final int DC_INFO_MEMBER_ADDED_TO_GROUP = 4;
public static final int DC_INFO_MEMBER_REMOVED_FROM_GROUP = 5;
public static final int DC_INFO_AUTOCRYPT_SETUP_MESSAGE = 6;
public static final int DC_INFO_SECURE_JOIN_MESSAGE = 7;
public static final int DC_INFO_LOCATIONSTREAMING_ENABLED = 8;
public static final int DC_INFO_LOCATION_ONLY = 9;
public static final int DC_INFO_EPHEMERAL_TIMER_CHANGED = 10;
public static final int DC_INFO_PROTECTION_ENABLED = 11;
public static final int DC_INFO_INVALID_UNENCRYPTED_MAIL = 13;
public static final int DC_INFO_WEBXDC_INFO_MESSAGE = 32;
public static final int DC_INFO_CHAT_E2EE = 50;
public static final int DC_INFO_CHAT_DESCRIPTION_CHANGED = 70;
public final static int DC_STATE_UNDEFINED = 0;
public final static int DC_STATE_IN_FRESH = 10;
public final static int DC_STATE_IN_NOTICED = 13;
public final static int DC_STATE_IN_SEEN = 16;
public final static int DC_STATE_OUT_PREPARING = 18;
public final static int DC_STATE_OUT_DRAFT = 19;
public final static int DC_STATE_OUT_PENDING = 20;
public final static int DC_STATE_OUT_FAILED = 24;
public final static int DC_STATE_OUT_DELIVERED = 26;
public final static int DC_STATE_OUT_MDN_RCVD = 28;
public static final int DC_STATE_UNDEFINED = 0;
public static final int DC_STATE_IN_FRESH = 10;
public static final int DC_STATE_IN_NOTICED = 13;
public static final int DC_STATE_IN_SEEN = 16;
public static final int DC_STATE_OUT_PREPARING = 18;
public static final int DC_STATE_OUT_DRAFT = 19;
public static final int DC_STATE_OUT_PENDING = 20;
public static final int DC_STATE_OUT_FAILED = 24;
public static final int DC_STATE_OUT_DELIVERED = 26;
public static final int DC_STATE_OUT_MDN_RCVD = 28;
public final static int DC_DOWNLOAD_DONE = 0;
public final static int DC_DOWNLOAD_AVAILABLE = 10;
public final static int DC_DOWNLOAD_FAILURE = 20;
public final static int DC_DOWNLOAD_UNDECIPHERABLE = 30;
public final static int DC_DOWNLOAD_IN_PROGRESS = 1000;
public static final int DC_DOWNLOAD_DONE = 0;
public static final int DC_DOWNLOAD_AVAILABLE = 10;
public static final int DC_DOWNLOAD_FAILURE = 20;
public static final int DC_DOWNLOAD_UNDECIPHERABLE = 30;
public static final int DC_DOWNLOAD_IN_PROGRESS = 1000;
public static final int DC_MSG_NO_ID = 0;
public final static int DC_MSG_ID_MARKER1 = 1;
public final static int DC_MSG_ID_DAYMARKER = 9;
public static final int DC_MSG_NO_ID = 0;
public static final int DC_MSG_ID_MARKER1 = 1;
public static final int DC_MSG_ID_DAYMARKER = 9;
public final static int DC_VIDEOCHATTYPE_UNKNOWN = 0;
public final static int DC_VIDEOCHATTYPE_BASICWEBRTC = 1;
public static final int DC_VIDEOCHATTYPE_UNKNOWN = 0;
public static final int DC_VIDEOCHATTYPE_BASICWEBRTC = 1;
private static final String TAG = DcMsg.class.getSimpleName();
private static final String TAG = DcMsg.class.getSimpleName();
public DcMsg(DcContext context, int viewtype) {
msgCPtr = context.createMsgCPtr(viewtype);
public DcMsg(DcContext context, int viewtype) {
msgCPtr = context.createMsgCPtr(viewtype);
}
public DcMsg(long msgCPtr) {
this.msgCPtr = msgCPtr;
}
public boolean isOk() {
return msgCPtr != 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefMsgCPtr();
msgCPtr = 0;
}
@Override
public int hashCode() {
return this.getId();
}
@Override
public boolean equals(Object other) {
if (other == null || !(other instanceof DcMsg)) {
return false;
}
public DcMsg(long msgCPtr) {
this.msgCPtr = msgCPtr;
}
DcMsg that = (DcMsg) other;
return this.getId() == that.getId() && this.getId() != 0;
}
public boolean isOk() {
return msgCPtr != 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefMsgCPtr();
msgCPtr = 0;
}
@Override
public int hashCode() {
return this.getId();
}
@Override
public boolean equals(Object other) {
if (other == null || !(other instanceof DcMsg)) {
return false;
}
DcMsg that = (DcMsg) other;
return this.getId()==that.getId() && this.getId()!=0;
}
/**
* If given a message, calculates the position of the message in the chat
*/
public static int getMessagePosition(DcMsg msg, DcContext dcContext) {
int msgs[] = dcContext.getChatMsgs(msg.getChatId(), 0, 0);
int startingPosition = -1;
int msgId = msg.getId();
for (int i = 0; i < msgs.length; i++) {
if (msgs[i] == msgId) {
startingPosition = msgs.length - 1 - i;
break;
}
}
return startingPosition;
}
public native int getId ();
public native String getText ();
public native String getSubject ();
public native long getTimestamp ();
public native long getSortTimestamp ();
public native boolean hasDeviatingTimestamp();
public native boolean hasLocation ();
private native int getViewType ();
public int getType () { return getDownloadState()==DC_DOWNLOAD_DONE? getViewType() : DC_MSG_TEXT; }
public native int getInfoType ();
public native int getInfoContactId ();
public native int getState ();
public native int getDownloadState ();
public native int getChatId ();
public native int getFromId ();
public native int getWidth (int def);
public native int getHeight (int def);
public native int getDuration ();
public native void lateFilingMediaSize(int width, int height, int duration);
public DcLot getSummary (DcChat chat) { return new DcLot(getSummaryCPtr(chat.getChatCPtr())); }
public native String getSummarytext (int approx_characters);
public native int showPadlock ();
public boolean hasFile () { String file = getFile(); return file!=null && !file.isEmpty(); }
public native String getFile ();
public native String getFilemime ();
public native String getFilename ();
public native long getFilebytes ();
public native byte[] getWebxdcBlob (String filename);
public JSONObject getWebxdcInfo () {
try {
String json = getWebxdcInfoJson();
if (json != null && !json.isEmpty()) return new JSONObject(json);
} catch(Exception e) {
e.printStackTrace();
/** If given a message, calculates the position of the message in the chat */
public static int getMessagePosition(DcMsg msg, DcContext dcContext) {
int msgs[] = dcContext.getChatMsgs(msg.getChatId(), 0, 0);
int startingPosition = -1;
int msgId = msg.getId();
for (int i = 0; i < msgs.length; i++) {
if (msgs[i] == msgId) {
startingPosition = msgs.length - 1 - i;
break;
}
return new JSONObject();
}
public native String getWebxdcHref ();
public native boolean isForwarded ();
public native boolean isInfo ();
public native boolean hasHtml ();
public native String getSetupCodeBegin ();
public native void setText (String text);
public native void setSubject (String text);
public native void setHtml (String text);
public native void forceSticker ();
public native void setFileAndDeduplicate(String file, String name, String filemime);
public native void setDimension (int width, int height);
public native void setDuration (int duration);
public native void setLocation (float latitude, float longitude);
public native String getPOILocation ();
public void setQuote (DcMsg quote) { setQuoteCPtr(quote.msgCPtr); }
public native String getQuotedText ();
public native String getError ();
public native String getOverrideSenderName();
public native boolean isEdited ();
return startingPosition;
}
public String getSenderName(DcContact dcContact) {
String overrideName = getOverrideSenderName();
if (overrideName != null) {
return "~" + overrideName;
} else {
return dcContact.getDisplayName();
}
}
public native int getId();
public DcMsg getQuotedMsg () {
long cPtr = getQuotedMsgCPtr();
return cPtr != 0 ? new DcMsg(cPtr) : null;
}
public native String getText();
public DcMsg getParent() {
long cPtr = getParentCPtr();
return cPtr != 0 ? new DcMsg(cPtr) : null;
}
public native String getSubject();
public native int getOriginalMsgId ();
public native int getSavedMsgId ();
public native long getTimestamp();
public boolean canSave() {
// saving info-messages out of context results in confusion, see https://github.com/deltachat/deltachat-ios/issues/2567
return !isInfo();
}
public native long getSortTimestamp();
public File getFileAsFile() {
if(getFile()==null)
throw new AssertionError("expected a file to be present.");
return new File(getFile());
}
public native boolean hasDeviatingTimestamp();
// aliases and higher-level tools
public static int[] msgSetToIds(final Set<DcMsg> dcMsgs) {
if (dcMsgs == null) {
return new int[0];
}
int[] ids = new int[dcMsgs.size()];
int i = 0;
for (DcMsg dcMsg : dcMsgs) {
ids[i++] = dcMsg.getId();
}
return ids;
}
public native boolean hasLocation();
public boolean isOutgoing() {
return getFromId() == DcContact.DC_CONTACT_ID_SELF;
}
private native int getViewType();
public String getDisplayBody() {
return getText();
}
public int getType() {
return getDownloadState() == DC_DOWNLOAD_DONE ? getViewType() : DC_MSG_TEXT;
}
public String getBody() {
return getText();
}
public native int getInfoType();
public long getDateReceived() {
return getTimestamp();
}
public native int getInfoContactId();
public boolean isFailed() {
return (getState() == DC_STATE_OUT_FAILED) || (!TextUtils.isEmpty(getError()));
}
public boolean isPreparing() {
return getState() == DC_STATE_OUT_PREPARING;
}
public boolean isSecure() {
return showPadlock()!=0;
}
public boolean isPending() {
return getState() == DC_STATE_OUT_PENDING;
}
public boolean isDelivered() {
return getState() == DC_STATE_OUT_DELIVERED;
}
public boolean isRemoteRead() {
return getState() == DC_STATE_OUT_MDN_RCVD;
}
public boolean isSeen() {
return getState() == DC_STATE_IN_SEEN;
}
public native int getState();
public native int getDownloadState();
// working with raw c-data
private long msgCPtr; // CAVE: the name is referenced in the JNI
private native void unrefMsgCPtr ();
private native long getSummaryCPtr (long chatCPtr);
private native void setQuoteCPtr (long quoteCPtr);
private native long getQuotedMsgCPtr ();
private native long getParentCPtr ();
private native String getWebxdcInfoJson ();
};
public native int getChatId();
public native int getFromId();
public native int getWidth(int def);
public native int getHeight(int def);
public native int getDuration();
public native void lateFilingMediaSize(int width, int height, int duration);
public DcLot getSummary(DcChat chat) {
return new DcLot(getSummaryCPtr(chat.getChatCPtr()));
}
public native String getSummarytext(int approx_characters);
public native int showPadlock();
public boolean hasFile() {
String file = getFile();
return file != null && !file.isEmpty();
}
public native String getFile();
public native String getFilemime();
public native String getFilename();
public native long getFilebytes();
public native byte[] getWebxdcBlob(String filename);
public JSONObject getWebxdcInfo() {
try {
String json = getWebxdcInfoJson();
if (json != null && !json.isEmpty()) return new JSONObject(json);
} catch (Exception e) {
e.printStackTrace();
}
return new JSONObject();
}
public native String getWebxdcHref();
public native boolean isForwarded();
public native boolean isInfo();
public native boolean hasHtml();
public native String getSetupCodeBegin();
public native void setText(String text);
public native void setSubject(String text);
public native void setHtml(String text);
public native void forceSticker();
public native void setFileAndDeduplicate(String file, String name, String filemime);
public native void setDimension(int width, int height);
public native void setDuration(int duration);
public native void setLocation(float latitude, float longitude);
public native String getPOILocation();
public void setQuote(DcMsg quote) {
setQuoteCPtr(quote.msgCPtr);
}
public native String getQuotedText();
public native String getError();
public native String getOverrideSenderName();
public native boolean isEdited();
public String getSenderName(DcContact dcContact) {
String overrideName = getOverrideSenderName();
if (overrideName != null) {
return "~" + overrideName;
} else {
return dcContact.getDisplayName();
}
}
public DcMsg getQuotedMsg() {
long cPtr = getQuotedMsgCPtr();
return cPtr != 0 ? new DcMsg(cPtr) : null;
}
public DcMsg getParent() {
long cPtr = getParentCPtr();
return cPtr != 0 ? new DcMsg(cPtr) : null;
}
public native int getOriginalMsgId();
public native int getSavedMsgId();
public boolean canSave() {
// saving info-messages out of context results in confusion, see
// https://github.com/deltachat/deltachat-ios/issues/2567
return !isInfo();
}
public File getFileAsFile() {
if (getFile() == null) throw new AssertionError("expected a file to be present.");
return new File(getFile());
}
// aliases and higher-level tools
public static int[] msgSetToIds(final Set<DcMsg> dcMsgs) {
if (dcMsgs == null) {
return new int[0];
}
int[] ids = new int[dcMsgs.size()];
int i = 0;
for (DcMsg dcMsg : dcMsgs) {
ids[i++] = dcMsg.getId();
}
return ids;
}
public boolean isOutgoing() {
return getFromId() == DcContact.DC_CONTACT_ID_SELF;
}
public String getDisplayBody() {
return getText();
}
public String getBody() {
return getText();
}
public long getDateReceived() {
return getTimestamp();
}
public boolean isFailed() {
return (getState() == DC_STATE_OUT_FAILED) || (!TextUtils.isEmpty(getError()));
}
public boolean isPreparing() {
return getState() == DC_STATE_OUT_PREPARING;
}
public boolean isSecure() {
return showPadlock() != 0;
}
public boolean isPending() {
return getState() == DC_STATE_OUT_PENDING;
}
public boolean isDelivered() {
return getState() == DC_STATE_OUT_DELIVERED;
}
public boolean isRemoteRead() {
return getState() == DC_STATE_OUT_MDN_RCVD;
}
public boolean isSeen() {
return getState() == DC_STATE_IN_SEEN;
}
// working with raw c-data
private long msgCPtr; // CAVE: the name is referenced in the JNI
private native void unrefMsgCPtr();
private native long getSummaryCPtr(long chatCPtr);
private native void setQuoteCPtr(long quoteCPtr);
private native long getQuotedMsgCPtr();
private native long getParentCPtr();
private native String getWebxdcInfoJson();
}
;
@@ -2,25 +2,29 @@ package com.b44t.messenger;
public class DcProvider {
public final static int DC_PROVIDER_STATUS_OK = 1;
public final static int DC_PROVIDER_STATUS_PREPARATION = 2;
public final static int DC_PROVIDER_STATUS_BROKEN = 3;
public static final int DC_PROVIDER_STATUS_OK = 1;
public static final int DC_PROVIDER_STATUS_PREPARATION = 2;
public static final int DC_PROVIDER_STATUS_BROKEN = 3;
public DcProvider(long providerCPtr) {
this.providerCPtr = providerCPtr;
}
public DcProvider(long providerCPtr) {
this.providerCPtr = providerCPtr;
}
@Override protected void finalize() throws Throwable {
super.finalize();
unrefProviderCPtr();
providerCPtr = 0;
}
@Override
protected void finalize() throws Throwable {
super.finalize();
unrefProviderCPtr();
providerCPtr = 0;
}
public native int getStatus ();
public native String getBeforeLoginHint ();
public native String getOverviewPage ();
public native int getStatus();
// working with raw c-data
private long providerCPtr; // CAVE: the name is referenced in the JNI
private native void unrefProviderCPtr();
public native String getBeforeLoginHint();
public native String getOverviewPage();
// working with raw c-data
private long providerCPtr; // CAVE: the name is referenced in the JNI
private native void unrefProviderCPtr();
}
@@ -19,4 +19,4 @@ public class FFITransport extends BaseTransport {
protected String getResponse() {
return dcJsonrpcInstance.getNextResponse();
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,61 +1,73 @@
package org.thoughtcrime.securesms;
import android.content.ComponentName;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.view.ActionMode;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.lifecycle.ViewModelProvider;
import androidx.media3.session.MediaController;
import androidx.media3.session.SessionCommand;
import androidx.media3.session.SessionToken;
import androidx.viewpager.widget.ViewPager;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import com.b44t.messenger.DcMsg;
import com.google.android.material.tabs.TabLayout;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.ArrayList;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.service.AudioPlaybackService;
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.ArrayList;
public class AllMediaActivity extends PassphraseRequiredActionBarActivity
implements DcEventCenter.DcEventDelegate
{
implements DcEventCenter.DcEventDelegate {
private static final String TAG = AllMediaActivity.class.getSimpleName();
public static final String CHAT_ID_EXTRA = "chat_id";
public static final String CHAT_ID_EXTRA = "chat_id";
public static final String CONTACT_ID_EXTRA = "contact_id";
public static final String FORCE_GALLERY = "force_gallery";
public static final String FORCE_GALLERY = "force_gallery";
static class TabData {
final int title;
final int type1;
final int type2;
final int type3;
TabData(int title, int type1, int type2, int type3) {
this.title = title;
this.type1 = type1;
this.type2 = type2;
this.type3 = type3;
}
};
}
;
private DcContext dcContext;
private int chatId;
private int contactId;
private DcContext dcContext;
private int chatId;
private int contactId;
private final ArrayList<TabData> tabs = new ArrayList<>();
private Toolbar toolbar;
private TabLayout tabLayout;
private ViewPager viewPager;
private Toolbar toolbar;
private TabLayout tabLayout;
private ViewPager viewPager;
private @Nullable MediaController mediaController;
private ListenableFuture<MediaController> mediaControllerFuture;
private AudioPlaybackViewModel playbackViewModel;
@Override
protected void onPreCreate() {
@@ -67,7 +79,9 @@ public class AllMediaActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onCreate(Bundle bundle, boolean ready) {
tabs.add(new TabData(R.string.webxdc_apps, DcMsg.DC_MSG_WEBXDC, 0, 0));
tabs.add(new TabData(R.string.tab_gallery, DcMsg.DC_MSG_IMAGE, DcMsg.DC_MSG_GIF, DcMsg.DC_MSG_VIDEO));
tabs.add(
new TabData(
R.string.tab_gallery, DcMsg.DC_MSG_IMAGE, DcMsg.DC_MSG_GIF, DcMsg.DC_MSG_VIDEO));
tabs.add(new TabData(R.string.audio, DcMsg.DC_MSG_AUDIO, DcMsg.DC_MSG_VOICE, 0));
tabs.add(new TabData(R.string.files, DcMsg.DC_MSG_FILE, 0, 0));
@@ -79,7 +93,8 @@ public class AllMediaActivity extends PassphraseRequiredActionBarActivity
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null) {
supportActionBar.setDisplayHomeAsUpEnabled(true);
supportActionBar.setTitle(isGlobalGallery() ? R.string.menu_all_media : R.string.apps_and_media);
supportActionBar.setTitle(
isGlobalGallery() ? R.string.menu_all_media : R.string.apps_and_media);
}
this.tabLayout.setupWithViewPager(viewPager);
@@ -91,41 +106,80 @@ public class AllMediaActivity extends PassphraseRequiredActionBarActivity
DcEventCenter eventCenter = DcHelper.getEventCenter(this);
eventCenter.addObserver(DcContext.DC_EVENT_CHAT_MODIFIED, this);
eventCenter.addObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
playbackViewModel = new ViewModelProvider(this).get(AudioPlaybackViewModel.class);
initializeMediaController();
}
@Override
public void onDestroy() {
DcHelper.getEventCenter(this).removeObservers(this);
if (mediaController != null) {
MediaController.releaseFuture(mediaControllerFuture);
mediaController = null;
playbackViewModel.setMediaController(null);
}
super.onDestroy();
}
@Override
public void handleEvent(@NonNull DcEvent event) {
}
public void handleEvent(@NonNull DcEvent event) {}
private void initializeResources() {
chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, 0);
contactId = getIntent().getIntExtra(CONTACT_ID_EXTRA, 0);
chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, 0);
contactId = getIntent().getIntExtra(CONTACT_ID_EXTRA, 0);
if (contactId!=0) {
if (contactId != 0) {
chatId = dcContext.getChatIdByContactId(contactId);
}
if(chatId!=0) {
if (chatId != 0) {
DcChat dcChat = dcContext.getChat(chatId);
if(!dcChat.isMultiUser()) {
if (!dcChat.isMultiUser()) {
final int[] members = dcContext.getChatContacts(chatId);
contactId = members.length>=1? members[0] : 0;
contactId = members.length >= 1 ? members[0] : 0;
}
}
this.viewPager = ViewUtil.findById(this, R.id.pager);
this.toolbar = ViewUtil.findById(this, R.id.toolbar);
this.toolbar = ViewUtil.findById(this, R.id.toolbar);
this.tabLayout = ViewUtil.findById(this, R.id.tab_layout);
}
private void initializeMediaController() {
SessionToken sessionToken =
new SessionToken(this, new ComponentName(this, AudioPlaybackService.class));
mediaControllerFuture = new MediaController.Builder(this, sessionToken).buildAsync();
mediaControllerFuture.addListener(
() -> {
try {
mediaController = mediaControllerFuture.get();
addActivityContext(this.getIntent().getExtras(), this.getClass().getName());
playbackViewModel.setMediaController(mediaController);
} catch (Exception e) {
Log.e(TAG, "Error connecting to audio playback service", e);
}
},
ContextCompat.getMainExecutor(this));
}
private void addActivityContext(Bundle extras, String activityClassName) {
if (mediaController == null) return;
Bundle commandArgs = new Bundle();
commandArgs.putString("activity_class", activityClassName);
if (extras != null) {
commandArgs.putAll(extras);
}
SessionCommand updateContextCommand =
new SessionCommand("UPDATE_ACTIVITY_CONTEXT", Bundle.EMPTY);
mediaController.sendCustomCommand(updateContextCommand, commandArgs);
}
private boolean isGlobalGallery() {
return contactId==0 && chatId==0;
return contactId == 0 && chatId == 0;
}
private class AllMediaPagerAdapter extends FragmentStatePagerAdapter {
@@ -159,10 +213,14 @@ public class AllMediaActivity extends PassphraseRequiredActionBarActivity
if (data.type1 == DcMsg.DC_MSG_IMAGE) {
fragment = new AllMediaGalleryFragment();
args.putInt(AllMediaGalleryFragment.CHAT_ID_EXTRA, (chatId==0&&!isGlobalGallery())? -1 : chatId);
args.putInt(
AllMediaGalleryFragment.CHAT_ID_EXTRA,
(chatId == 0 && !isGlobalGallery()) ? -1 : chatId);
} else {
fragment = new AllMediaDocumentsFragment();
args.putInt(AllMediaDocumentsFragment.CHAT_ID_EXTRA, (chatId==0&&!isGlobalGallery())? -1 : chatId);
args.putInt(
AllMediaDocumentsFragment.CHAT_ID_EXTRA,
(chatId == 0 && !isGlobalGallery()) ? -1 : chatId);
args.putInt(AllMediaDocumentsFragment.VIEWTYPE1, data.type1);
args.putInt(AllMediaDocumentsFragment.VIEWTYPE2, data.type2);
}
@@ -5,15 +5,16 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.b44t.messenger.DcMsg;
import com.codewaves.stickyheadergrid.StickyHeaderGridAdapter;
import org.thoughtcrime.securesms.components.AudioView;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.thoughtcrime.securesms.components.DocumentView;
import org.thoughtcrime.securesms.components.WebxdcView;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.components.audioplay.AudioView;
import org.thoughtcrime.securesms.database.loaders.BucketedThreadMediaLoader.BucketedThreadMedia;
import org.thoughtcrime.securesms.mms.AudioSlide;
import org.thoughtcrime.securesms.mms.DocumentSlide;
@@ -21,30 +22,27 @@ import org.thoughtcrime.securesms.mms.Slide;
import org.thoughtcrime.securesms.util.DateUtils;
import org.thoughtcrime.securesms.util.MediaUtil;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
class AllMediaDocumentsAdapter extends StickyHeaderGridAdapter {
private final Context context;
private final ItemClickListener itemClickListener;
private final Set<DcMsg> selected;
private final Context context;
private final ItemClickListener itemClickListener;
private final Set<DcMsg> selected;
private BucketedThreadMedia media;
private BucketedThreadMedia media;
private AudioPlaybackViewModel playbackViewModel;
private static class ViewHolder extends StickyHeaderGridAdapter.ItemViewHolder {
private final DocumentView documentView;
private final AudioView audioView;
private final WebxdcView webxdcView;
private final TextView date;
private final AudioView audioView;
private final WebxdcView webxdcView;
private final TextView date;
public ViewHolder(View v) {
super(v);
documentView = v.findViewById(R.id.document_view);
audioView = v.findViewById(R.id.audio_view);
webxdcView = v.findViewById(R.id.webxdc_view);
date = v.findViewById(R.id.date);
documentView = v.findViewById(R.id.document_view);
audioView = v.findViewById(R.id.audio_view);
webxdcView = v.findViewById(R.id.webxdc_view);
date = v.findViewById(R.id.date);
}
}
@@ -57,86 +55,108 @@ class AllMediaDocumentsAdapter extends StickyHeaderGridAdapter {
}
}
AllMediaDocumentsAdapter(@NonNull Context context,
BucketedThreadMedia media,
ItemClickListener clickListener)
{
this.context = context;
this.media = media;
AllMediaDocumentsAdapter(
@NonNull Context context, BucketedThreadMedia media, ItemClickListener clickListener) {
this.context = context;
this.media = media;
this.itemClickListener = clickListener;
this.selected = new HashSet<>();
this.selected = new HashSet<>();
}
public void setMedia(BucketedThreadMedia media) {
this.media = media;
}
public void setPlaybackViewModel(AudioPlaybackViewModel playbackViewModel) {
this.playbackViewModel = playbackViewModel;
}
@Override
public StickyHeaderGridAdapter.HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent, int headerType) {
return new HeaderHolder(LayoutInflater.from(context).inflate(R.layout.contact_selection_list_divider, parent, false));
public StickyHeaderGridAdapter.HeaderViewHolder onCreateHeaderViewHolder(
ViewGroup parent, int headerType) {
return new HeaderHolder(
LayoutInflater.from(context)
.inflate(R.layout.contact_selection_list_divider, parent, false));
}
@Override
public ItemViewHolder onCreateItemViewHolder(ViewGroup parent, int itemType) {
return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.profile_document_item, parent, false));
return new ViewHolder(
LayoutInflater.from(context).inflate(R.layout.profile_document_item, parent, false));
}
@Override
public void onBindHeaderViewHolder(StickyHeaderGridAdapter.HeaderViewHolder viewHolder, int section) {
((HeaderHolder)viewHolder).textView.setText(media.getName(section));
public void onBindHeaderViewHolder(
StickyHeaderGridAdapter.HeaderViewHolder viewHolder, int section) {
((HeaderHolder) viewHolder).textView.setText(media.getName(section));
}
@Override
public void onBindItemViewHolder(ItemViewHolder itemViewHolder, int section, int offset) {
ViewHolder viewHolder = ((ViewHolder)itemViewHolder);
DcMsg dcMsg = media.get(section, offset);
Slide slide = MediaUtil.getSlideForMsg(context, dcMsg);
ViewHolder viewHolder = ((ViewHolder) itemViewHolder);
DcMsg dcMsg = media.get(section, offset);
Slide slide = MediaUtil.getSlideForMsg(context, dcMsg);
if (slide != null && slide.hasAudio()) {
viewHolder.documentView.setVisibility(View.GONE);
viewHolder.webxdcView.setVisibility(View.GONE);
viewHolder.audioView.setVisibility(View.VISIBLE);
viewHolder.audioView.setAudio((AudioSlide)slide, dcMsg.getDuration());
viewHolder.audioView.setPlaybackViewModel(playbackViewModel);
viewHolder.audioView.setAudio((AudioSlide) slide);
viewHolder.audioView.setOnClickListener(view -> itemClickListener.onMediaClicked(dcMsg));
viewHolder.audioView.setOnLongClickListener(view -> { itemClickListener.onMediaLongClicked(dcMsg); return true; });
viewHolder.audioView.setOnLongClickListener(
view -> {
itemClickListener.onMediaLongClicked(dcMsg);
return true;
});
viewHolder.audioView.disablePlayer(!selected.isEmpty());
viewHolder.itemView.setOnClickListener(view -> itemClickListener.onMediaClicked(dcMsg));
viewHolder.date.setVisibility(View.VISIBLE);
}
else if (slide != null && slide.isWebxdcDocument()) {
} else if (slide != null && slide.isWebxdcDocument()) {
viewHolder.audioView.setVisibility(View.GONE);
viewHolder.documentView.setVisibility(View.GONE);
viewHolder.webxdcView.setVisibility(View.VISIBLE);
viewHolder.webxdcView.setWebxdc(dcMsg, "");
viewHolder.webxdcView.setOnClickListener(view -> itemClickListener.onMediaClicked(dcMsg));
viewHolder.webxdcView.setOnLongClickListener(view -> { itemClickListener.onMediaLongClicked(dcMsg); return true; });
viewHolder.webxdcView.setOnLongClickListener(
view -> {
itemClickListener.onMediaLongClicked(dcMsg);
return true;
});
viewHolder.itemView.setOnClickListener(view -> itemClickListener.onMediaClicked(dcMsg));
viewHolder.date.setVisibility(View.GONE);
}
else if (slide != null && slide.hasDocument()) {
} else if (slide != null && slide.hasDocument()) {
viewHolder.audioView.setVisibility(View.GONE);
viewHolder.webxdcView.setVisibility(View.GONE);
viewHolder.documentView.setVisibility(View.VISIBLE);
viewHolder.documentView.setDocument((DocumentSlide)slide);
viewHolder.documentView.setDocument((DocumentSlide) slide);
viewHolder.documentView.setOnClickListener(view -> itemClickListener.onMediaClicked(dcMsg));
viewHolder.documentView.setOnLongClickListener(view -> { itemClickListener.onMediaLongClicked(dcMsg); return true; });
viewHolder.documentView.setOnLongClickListener(
view -> {
itemClickListener.onMediaLongClicked(dcMsg);
return true;
});
viewHolder.itemView.setOnClickListener(view -> itemClickListener.onMediaClicked(dcMsg));
viewHolder.date.setVisibility(View.VISIBLE);
}
else {
} else {
viewHolder.documentView.setVisibility(View.GONE);
viewHolder.audioView.setVisibility(View.GONE);
viewHolder.webxdcView.setVisibility(View.GONE);
viewHolder.date.setVisibility(View.GONE);
}
viewHolder.itemView.setOnLongClickListener(view -> { itemClickListener.onMediaLongClicked(dcMsg); return true; });
viewHolder.itemView.setOnLongClickListener(
view -> {
itemClickListener.onMediaLongClicked(dcMsg);
return true;
});
viewHolder.itemView.setSelected(selected.contains(dcMsg));
viewHolder.date.setText(DateUtils.getBriefRelativeTimeSpanString(context, dcMsg.getTimestamp()));
viewHolder.date.setText(
DateUtils.getBriefRelativeTimeSpanString(context, dcMsg.getTimestamp()));
}
@Override
@@ -177,6 +197,7 @@ class AllMediaDocumentsAdapter extends StickyHeaderGridAdapter {
interface ItemClickListener {
void onMediaClicked(@NonNull DcMsg mediaRecord);
void onMediaLongClicked(DcMsg mediaRecord);
}
}
@@ -12,31 +12,27 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.view.ActionMode;
import androidx.lifecycle.ViewModelProvider;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import com.b44t.messenger.DcMsg;
import com.codewaves.stickyheadergrid.StickyHeaderGridLayoutManager;
import java.util.Set;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.database.loaders.BucketedThreadMediaLoader;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.Set;
public class AllMediaDocumentsFragment
extends MessageSelectorFragment
public class AllMediaDocumentsFragment extends MessageSelectorFragment
implements LoaderManager.LoaderCallbacks<BucketedThreadMediaLoader.BucketedThreadMedia>,
AllMediaDocumentsAdapter.ItemClickListener
{
AllMediaDocumentsAdapter.ItemClickListener {
public static final String CHAT_ID_EXTRA = "chat_id";
public static final String VIEWTYPE1 = "viewtype1";
public static final String VIEWTYPE2 = "viewtype2";
@@ -48,13 +44,12 @@ public class AllMediaDocumentsFragment
private int viewtype1;
private int viewtype2;
protected int chatId;
protected int chatId;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
dcContext = DcHelper.getContext(getContext());
chatId = getArguments().getInt(CHAT_ID_EXTRA, -1);
viewtype1 = getArguments().getInt(VIEWTYPE1, 0);
viewtype2 = getArguments().getInt(VIEWTYPE2, 0);
@@ -63,19 +58,23 @@ public class AllMediaDocumentsFragment
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
public View onCreateView(
@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.profile_documents_fragment, container, false);
this.recyclerView = ViewUtil.findById(view, R.id.recycler_view);
this.noMedia = ViewUtil.findById(view, R.id.no_documents);
this.gridManager = new StickyHeaderGridLayoutManager(1);
this.noMedia = ViewUtil.findById(view, R.id.no_documents);
this.gridManager = new StickyHeaderGridLayoutManager(1);
// add padding to avoid content hidden behind system bars
ViewUtil.applyWindowInsets(recyclerView, true, false, true, true);
this.recyclerView.setAdapter(new AllMediaDocumentsAdapter(getContext(),
new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()),
this));
AllMediaDocumentsAdapter adapter =
new AllMediaDocumentsAdapter(
getContext(), new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()), this);
this.recyclerView.setAdapter(adapter);
adapter.setPlaybackViewModel(
new ViewModelProvider(requireActivity()).get(AudioPlaybackViewModel.class));
this.recyclerView.setLayoutManager(gridManager);
this.recyclerView.setHasFixedSize(true);
@@ -106,12 +105,15 @@ public class AllMediaDocumentsFragment
}
@Override
public Loader<BucketedThreadMediaLoader.BucketedThreadMedia> onCreateLoader(int i, Bundle bundle) {
public Loader<BucketedThreadMediaLoader.BucketedThreadMedia> onCreateLoader(
int i, Bundle bundle) {
return new BucketedThreadMediaLoader(getContext(), chatId, viewtype1, viewtype2, 0);
}
@Override
public void onLoadFinished(Loader<BucketedThreadMediaLoader.BucketedThreadMedia> loader, BucketedThreadMediaLoader.BucketedThreadMedia bucketedThreadMedia) {
public void onLoadFinished(
Loader<BucketedThreadMediaLoader.BucketedThreadMedia> loader,
BucketedThreadMediaLoader.BucketedThreadMedia bucketedThreadMedia) {
((AllMediaDocumentsAdapter) recyclerView.getAdapter()).setMedia(bucketedThreadMedia);
((AllMediaDocumentsAdapter) recyclerView.getAdapter()).notifyAllSectionsDataSetChanged();
@@ -119,7 +121,7 @@ public class AllMediaDocumentsFragment
if (chatId == DC_CHAT_NO_CHAT) {
if (viewtype1 == DcMsg.DC_MSG_WEBXDC) {
noMedia.setText(R.string.all_apps_empty_hint);
} else if (viewtype1 == DcMsg.DC_MSG_FILE){
} else if (viewtype1 == DcMsg.DC_MSG_FILE) {
noMedia.setText(R.string.all_files_empty_hint);
} else {
noMedia.setText(R.string.tab_all_media_empty_hint);
@@ -134,7 +136,8 @@ public class AllMediaDocumentsFragment
@Override
public void onLoaderReset(Loader<BucketedThreadMediaLoader.BucketedThreadMedia> cursorLoader) {
((AllMediaDocumentsAdapter) recyclerView.getAdapter()).setMedia(new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()));
((AllMediaDocumentsAdapter) recyclerView.getAdapter())
.setMedia(new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()));
}
@Override
@@ -165,7 +168,7 @@ public class AllMediaDocumentsFragment
private void handleMediaPreviewClick(@NonNull DcMsg dcMsg) {
// audio is started by the play-button
if (dcMsg.getType()==DcMsg.DC_MSG_AUDIO || dcMsg.getType()==DcMsg.DC_MSG_VOICE) {
if (dcMsg.getType() == DcMsg.DC_MSG_AUDIO || dcMsg.getType() == DcMsg.DC_MSG_VOICE) {
return;
}
@@ -213,7 +216,8 @@ public class AllMediaDocumentsFragment
}
menu.findItem(R.id.menu_resend).setVisible(canResend);
boolean webxdcApp = singleSelection && messageRecords.iterator().next().getType() == DcMsg.DC_MSG_WEBXDC;
boolean webxdcApp =
singleSelection && messageRecords.iterator().next().getType() == DcMsg.DC_MSG_WEBXDC;
menu.findItem(R.id.menu_add_to_home_screen).setVisible(webxdcApp);
}
@@ -240,19 +244,26 @@ public class AllMediaDocumentsFragment
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem menuItem) {
int itemId = menuItem.getItemId();
AudioPlaybackViewModel playbackViewModel =
new ViewModelProvider(requireActivity()).get(AudioPlaybackViewModel.class);
if (itemId == R.id.details) {
handleDisplayDetails(getSelectedMessageRecord(getListAdapter().getSelectedMedia()));
mode.finish();
return true;
} else if (itemId == R.id.delete) {
handleDeleteMessages(chatId, getListAdapter().getSelectedMedia());
handleDeleteMessages(
chatId,
getListAdapter().getSelectedMedia(),
playbackViewModel::stopByIds,
playbackViewModel::stopByIds);
mode.finish();
return true;
} else if (itemId == R.id.share) {
handleShare(getSelectedMessageRecord(getListAdapter().getSelectedMedia()));
return true;
} else if (itemId == R.id.menu_add_to_home_screen) {
WebxdcActivity.addToHomeScreen(getActivity(), getSelectedMessageRecord(getListAdapter().getSelectedMedia()).getId());
WebxdcActivity.addToHomeScreen(
getActivity(), getSelectedMessageRecord(getListAdapter().getSelectedMedia()).getId());
mode.finish();
return true;
} else if (itemId == R.id.show_in_chat) {
@@ -5,38 +5,34 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.b44t.messenger.DcMsg;
import com.codewaves.stickyheadergrid.StickyHeaderGridAdapter;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.thoughtcrime.securesms.components.ThumbnailView;
import org.thoughtcrime.securesms.database.loaders.BucketedThreadMediaLoader.BucketedThreadMedia;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.mms.Slide;
import org.thoughtcrime.securesms.util.MediaUtil;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
class AllMediaGalleryAdapter extends StickyHeaderGridAdapter {
private final Context context;
private final GlideRequests glideRequests;
private final ItemClickListener itemClickListener;
private final Set<DcMsg> selected;
private final Context context;
private final GlideRequests glideRequests;
private final ItemClickListener itemClickListener;
private final Set<DcMsg> selected;
private BucketedThreadMedia media;
private BucketedThreadMedia media;
private static class ViewHolder extends StickyHeaderGridAdapter.ItemViewHolder {
final ThumbnailView imageView;
final View selectedIndicator;
final View selectedIndicator;
ViewHolder(View v) {
super(v);
imageView = v.findViewById(R.id.image);
imageView = v.findViewById(R.id.image);
selectedIndicator = v.findViewById(R.id.selected_indicator);
}
}
@@ -50,16 +46,16 @@ class AllMediaGalleryAdapter extends StickyHeaderGridAdapter {
}
}
AllMediaGalleryAdapter(@NonNull Context context,
@NonNull GlideRequests glideRequests,
BucketedThreadMedia media,
ItemClickListener clickListener)
{
this.context = context;
this.glideRequests = glideRequests;
this.media = media;
AllMediaGalleryAdapter(
@NonNull Context context,
@NonNull GlideRequests glideRequests,
BucketedThreadMedia media,
ItemClickListener clickListener) {
this.context = context;
this.glideRequests = glideRequests;
this.media = media;
this.itemClickListener = clickListener;
this.selected = new HashSet<>();
this.selected = new HashSet<>();
}
public void setMedia(BucketedThreadMedia media) {
@@ -67,36 +63,42 @@ class AllMediaGalleryAdapter extends StickyHeaderGridAdapter {
}
@Override
public StickyHeaderGridAdapter.HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent, int headerType) {
return new HeaderHolder(LayoutInflater.from(context).inflate(R.layout.contact_selection_list_divider, parent, false));
public StickyHeaderGridAdapter.HeaderViewHolder onCreateHeaderViewHolder(
ViewGroup parent, int headerType) {
return new HeaderHolder(
LayoutInflater.from(context)
.inflate(R.layout.contact_selection_list_divider, parent, false));
}
@Override
public ItemViewHolder onCreateItemViewHolder(ViewGroup parent, int itemType) {
return new ViewHolder(LayoutInflater.from(context).inflate(R.layout.profile_gallery_item, parent, false));
return new ViewHolder(
LayoutInflater.from(context).inflate(R.layout.profile_gallery_item, parent, false));
}
@Override
public void onBindHeaderViewHolder(StickyHeaderGridAdapter.HeaderViewHolder viewHolder, int section) {
((HeaderHolder)viewHolder).textView.setText(media.getName(section));
public void onBindHeaderViewHolder(
StickyHeaderGridAdapter.HeaderViewHolder viewHolder, int section) {
((HeaderHolder) viewHolder).textView.setText(media.getName(section));
}
@Override
public void onBindItemViewHolder(ItemViewHolder viewHolder, int section, int offset) {
DcMsg mediaRecord = media.get(section, offset);
ThumbnailView thumbnailView = ((ViewHolder)viewHolder).imageView;
View selectedIndicator = ((ViewHolder)viewHolder).selectedIndicator;
Slide slide = MediaUtil.getSlideForMsg(context, mediaRecord);
DcMsg mediaRecord = media.get(section, offset);
ThumbnailView thumbnailView = ((ViewHolder) viewHolder).imageView;
View selectedIndicator = ((ViewHolder) viewHolder).selectedIndicator;
Slide slide = MediaUtil.getSlideForMsg(context, mediaRecord);
if (slide != null) {
thumbnailView.setImageResource(glideRequests, slide);
}
thumbnailView.setOnClickListener(view -> itemClickListener.onMediaClicked(mediaRecord));
thumbnailView.setOnLongClickListener(view -> {
itemClickListener.onMediaLongClicked(mediaRecord);
return true;
});
thumbnailView.setOnLongClickListener(
view -> {
itemClickListener.onMediaLongClicked(mediaRecord);
return true;
});
selectedIndicator.setVisibility(selected.contains(mediaRecord) ? View.VISIBLE : View.GONE);
}
@@ -139,6 +141,7 @@ class AllMediaGalleryAdapter extends StickyHeaderGridAdapter {
interface ItemClickListener {
void onMediaClicked(@NonNull DcMsg mediaRecord);
void onMediaLongClicked(DcMsg mediaRecord);
}
}
@@ -12,19 +12,17 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.view.ActionMode;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import com.b44t.messenger.DcMsg;
import com.codewaves.stickyheadergrid.StickyHeaderGridLayoutManager;
import java.util.Set;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.database.Address;
@@ -32,13 +30,9 @@ import org.thoughtcrime.securesms.database.loaders.BucketedThreadMediaLoader;
import org.thoughtcrime.securesms.mms.GlideApp;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.Set;
public class AllMediaGalleryFragment
extends MessageSelectorFragment
public class AllMediaGalleryFragment extends MessageSelectorFragment
implements LoaderManager.LoaderCallbacks<BucketedThreadMediaLoader.BucketedThreadMedia>,
AllMediaGalleryAdapter.ItemClickListener
{
AllMediaGalleryAdapter.ItemClickListener {
public static final String CHAT_ID_EXTRA = "chat_id";
protected TextView noMedia;
@@ -46,33 +40,35 @@ public class AllMediaGalleryFragment
private StickyHeaderGridLayoutManager gridManager;
private final ActionModeCallback actionModeCallback = new ActionModeCallback();
private int chatId;
private int chatId;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
dcContext = DcHelper.getContext(getContext());
chatId = getArguments().getInt(CHAT_ID_EXTRA, -1);
getLoaderManager().initLoader(0, null, this);
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
public View onCreateView(
@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.profile_gallery_fragment, container, false);
this.recyclerView = ViewUtil.findById(view, R.id.media_grid);
this.noMedia = ViewUtil.findById(view, R.id.no_images);
this.gridManager = new StickyHeaderGridLayoutManager(getCols());
this.noMedia = ViewUtil.findById(view, R.id.no_images);
this.gridManager = new StickyHeaderGridLayoutManager(getCols());
// add padding to avoid content hidden behind system bars
ViewUtil.applyWindowInsets(recyclerView, true, false, true, true);
this.recyclerView.setAdapter(new AllMediaGalleryAdapter(getContext(),
GlideApp.with(this),
new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()),
this));
this.recyclerView.setAdapter(
new AllMediaGalleryAdapter(
getContext(),
GlideApp.with(this),
new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()),
this));
this.recyclerView.setLayoutManager(gridManager);
this.recyclerView.setHasFixedSize(true);
@@ -95,7 +91,9 @@ public class AllMediaGalleryFragment
}
private int getCols() {
return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE? 5 : 3;
return getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE
? 5
: 3;
}
@Override
@@ -108,12 +106,16 @@ public class AllMediaGalleryFragment
}
@Override
public Loader<BucketedThreadMediaLoader.BucketedThreadMedia> onCreateLoader(int i, Bundle bundle) {
return new BucketedThreadMediaLoader(getContext(), chatId, DcMsg.DC_MSG_IMAGE, DcMsg.DC_MSG_GIF, DcMsg.DC_MSG_VIDEO);
public Loader<BucketedThreadMediaLoader.BucketedThreadMedia> onCreateLoader(
int i, Bundle bundle) {
return new BucketedThreadMediaLoader(
getContext(), chatId, DcMsg.DC_MSG_IMAGE, DcMsg.DC_MSG_GIF, DcMsg.DC_MSG_VIDEO);
}
@Override
public void onLoadFinished(Loader<BucketedThreadMediaLoader.BucketedThreadMedia> loader, BucketedThreadMediaLoader.BucketedThreadMedia bucketedThreadMedia) {
public void onLoadFinished(
Loader<BucketedThreadMediaLoader.BucketedThreadMedia> loader,
BucketedThreadMediaLoader.BucketedThreadMedia bucketedThreadMedia) {
((AllMediaGalleryAdapter) recyclerView.getAdapter()).setMedia(bucketedThreadMedia);
((AllMediaGalleryAdapter) recyclerView.getAdapter()).notifyAllSectionsDataSetChanged();
@@ -126,7 +128,8 @@ public class AllMediaGalleryFragment
@Override
public void onLoaderReset(Loader<BucketedThreadMediaLoader.BucketedThreadMedia> cursorLoader) {
((AllMediaGalleryAdapter) recyclerView.getAdapter()).setMedia(new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()));
((AllMediaGalleryAdapter) recyclerView.getAdapter())
.setMedia(new BucketedThreadMediaLoader.BucketedThreadMedia(getContext()));
}
@Override
@@ -23,6 +23,7 @@ import androidx.work.WorkManager;
import com.b44t.messenger.DcAccounts;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import com.b44t.messenger.DcEventChannel;
import com.b44t.messenger.DcEventEmitter;
import com.b44t.messenger.FFITransport;
@@ -64,9 +65,9 @@ public class ApplicationContext extends MultiDexApplication {
private Rpc rpc;
private DcContext dcContext;
public DcLocationManager dcLocationManager;
public DcEventCenter eventCenter;
public NotificationCenter notificationCenter;
private DcLocationManager dcLocationManager;
private DcEventCenter eventCenter;
private NotificationCenter notificationCenter;
private JobManager jobManager;
private int debugOnAvailableCount;
@@ -129,6 +130,33 @@ public class ApplicationContext extends MultiDexApplication {
}
}
/**
* Get DcLocationManager instance, waiting for initialization if necessary.
* This method is thread-safe and will block until initialization is complete.
*/
public DcLocationManager getLocationManager() {
ensureInitialized();
return dcLocationManager;
}
/**
* Get DcEventCenter instance, waiting for initialization if necessary.
* This method is thread-safe and will block until initialization is complete.
*/
public DcEventCenter getEventCenter() {
ensureInitialized();
return eventCenter;
}
/**
* Get NotificationCenter instance, waiting for initialization if necessary.
* This method is thread-safe and will block until initialization is complete.
*/
public NotificationCenter getNotificationCenter() {
ensureInitialized();
return notificationCenter;
}
@Override
public void onCreate() {
super.onCreate();
@@ -137,7 +165,8 @@ public class ApplicationContext extends MultiDexApplication {
StringWriter stringWriter = new StringWriter();
throwable.printStackTrace(new PrintWriter(stringWriter, true));
String errorMsg = "Android " + Build.VERSION.RELEASE +":\n" + stringWriter.getBuffer().toString();
String subject = "ArcaneChat " + BuildConfig.VERSION_NAME + " Crash Report";
errorMsg += "\n" + LogViewFragment.grabLogcat();
String subject = "ArcaneChat " + BuildConfig.VERSION_NAME + "-" + BuildConfig.FLAVOR + " Crash Report";
Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
@@ -168,7 +197,29 @@ public class ApplicationContext extends MultiDexApplication {
Util.runOnBackground(() -> {
synchronized (initLock) {
try {
dcAccounts = new DcAccounts(new File(getFilesDir(), "accounts").getAbsolutePath());
DcEventChannel eventChannel = new DcEventChannel();
DcEventEmitter emitter = eventChannel.getEventEmitter();
eventCenter = new DcEventCenter(this);
new Thread(() -> {
Log.i(TAG, "Starting event loop");
while (true) {
DcEvent event = emitter.getNextEvent();
if (event == null) {
break;
}
if (isInitialized) {
eventCenter.handleEvent(event);
} else {
// not fully initialized, only handle logging events,
// ex. account migrations during DcAccounts initialization
eventCenter.handleLogging(event);
}
}
Log.i("DeltaChat", "shutting down event handler");
}, "eventThread").start();
dcAccounts = new DcAccounts(new File(getFilesDir(), "accounts").getAbsolutePath(), eventChannel);
Log.i(TAG, "DcAccounts created");
rpc = new Rpc(new FFITransport(dcAccounts.getJsonrpcInstance()));
Log.i(TAG, "Rpc created");
@@ -190,7 +241,11 @@ public class ApplicationContext extends MultiDexApplication {
}
}
// 2025.11.12: this is needed until core starts ignoring "delete_server_after" for chatmail
// 2025-12-16: The setting was removed.
// Revert it to the default if it was changed in the past.
ac.setConfigInt("webxdc_realtime_enabled", 1);
// 2025-11-12: this is needed until core starts ignoring "delete_server_after" for chatmail
if (ac.isChatmail()) {
ac.setConfig("delete_server_after", null); // reset
}
@@ -204,29 +259,12 @@ public class ApplicationContext extends MultiDexApplication {
}
dcContext = dcAccounts.getSelectedAccount();
notificationCenter = new NotificationCenter(this);
eventCenter = new DcEventCenter(this);
dcLocationManager = new DcLocationManager(this, dcContext);
// Mark as initialized before starting threads that depend on it
isInitialized = true;
initLock.notifyAll();
Log.i(TAG, "DcAccounts initialization complete");
dcLocationManager = new DcLocationManager(this); // depends on dcContext
new Thread(() -> {
Log.i(TAG, "Starting event loop");
DcEventEmitter emitter = dcAccounts.getEventEmitter();
Log.i(TAG, "DcEventEmitter obtained");
while (true) {
DcEvent event = emitter.getNextEvent();
if (event==null) {
break;
}
eventCenter.handleEvent(event);
}
Log.i("DeltaChat", "shutting down event handler");
}, "eventThread").start();
// set translations before starting I/O to avoid sending untranslated MDNs (issue #2288)
DcHelper.setStockTranslations(this);
@@ -21,7 +21,8 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
@@ -30,19 +31,17 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import androidx.preference.Preference;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.permissions.Permissions;
import org.thoughtcrime.securesms.preferences.AdvancedPreferenceFragment;
import org.thoughtcrime.securesms.preferences.AppearancePreferenceFragment;
import org.thoughtcrime.securesms.preferences.ChatsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.PrivacyPreferenceFragment;
import org.thoughtcrime.securesms.preferences.CorrectedPreferenceFragment;
import org.thoughtcrime.securesms.preferences.NotificationsPreferenceFragment;
import org.thoughtcrime.securesms.preferences.PrivacyPreferenceFragment;
import org.thoughtcrime.securesms.preferences.widgets.ProfilePreference;
import org.thoughtcrime.securesms.qr.BackupTransferActivity;
import org.thoughtcrime.securesms.util.DynamicTheme;
@@ -55,24 +54,22 @@ import org.thoughtcrime.securesms.util.ViewUtil;
* The Activity for application preference display and management.
*
* @author Moxie Marlinspike
*
*/
public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarActivity
implements SharedPreferences.OnSharedPreferenceChangeListener
{
private static final String PREFERENCE_CATEGORY_PROFILE = "preference_category_profile";
private static final String PREFERENCE_CATEGORY_NOTIFICATIONS = "preference_category_notifications";
private static final String PREFERENCE_CATEGORY_APPEARANCE = "preference_category_appearance";
private static final String PREFERENCE_CATEGORY_CHATS = "preference_category_chats";
private static final String PREFERENCE_CATEGORY_PRIVACY = "preference_category_privacy";
private static final String PREFERENCE_CATEGORY_MULTIDEVICE = "preference_category_multidevice";
private static final String PREFERENCE_CATEGORY_ADVANCED = "preference_category_advanced";
private static final String PREFERENCE_CATEGORY_CONNECTIVITY = "preference_category_connectivity";
private static final String PREFERENCE_CATEGORY_DONATE = "preference_category_donate";
private static final String PREFERENCE_CATEGORY_HELP = "preference_category_help";
implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String PREFERENCE_CATEGORY_PROFILE = "preference_category_profile";
private static final String PREFERENCE_CATEGORY_NOTIFICATIONS =
"preference_category_notifications";
private static final String PREFERENCE_CATEGORY_APPEARANCE = "preference_category_appearance";
private static final String PREFERENCE_CATEGORY_CHATS = "preference_category_chats";
private static final String PREFERENCE_CATEGORY_PRIVACY = "preference_category_privacy";
private static final String PREFERENCE_CATEGORY_MULTIDEVICE = "preference_category_multidevice";
private static final String PREFERENCE_CATEGORY_ADVANCED = "preference_category_advanced";
private static final String PREFERENCE_CATEGORY_CONNECTIVITY = "preference_category_connectivity";
private static final String PREFERENCE_CATEGORY_DONATE = "preference_category_donate";
private static final String PREFERENCE_CATEGORY_HELP = "preference_category_help";
public static final int REQUEST_CODE_SET_BACKGROUND = 11;
public static final int REQUEST_CODE_SET_BACKGROUND = 11;
@Override
protected void onCreate(Bundle icicle, boolean ready) {
@@ -89,18 +86,6 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == ScreenLockUtil.REQUEST_CODE_CONFIRM_CREDENTIALS) {
showBackupProvider();
return;
}
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment);
fragment.onActivityResult(requestCode, resultCode, data);
}
@Override
public boolean onSupportNavigateUp() {
FragmentManager fragmentManager = getSupportFragmentManager();
@@ -125,34 +110,51 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
public void showBackupProvider() {
Intent intent = new Intent(this, BackupTransferActivity.class);
intent.putExtra(BackupTransferActivity.TRANSFER_MODE, BackupTransferActivity.TransferMode.SENDER_SHOW_QR.getInt());
intent.putExtra(
BackupTransferActivity.TRANSFER_MODE,
BackupTransferActivity.TransferMode.SENDER_SHOW_QR.getInt());
startActivity(intent);
overridePendingTransition(0, 0); // let the activity appear in the same way as the other pages (which are mostly fragments)
overridePendingTransition(
0, 0); // let the activity appear in the same way as the other pages (which are mostly
// fragments)
finishAffinity(); // see comment (**2) in BackupTransferActivity.doFinish()
}
public static class ApplicationPreferenceFragment extends CorrectedPreferenceFragment implements DcEventCenter.DcEventDelegate {
public static class ApplicationPreferenceFragment extends CorrectedPreferenceFragment
implements DcEventCenter.DcEventDelegate {
private ActivityResultLauncher<Intent> screenLockLauncher;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
screenLockLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == RESULT_OK) {
((ApplicationPreferencesActivity) getActivity()).showBackupProvider();
}
});
this.findPreference(PREFERENCE_CATEGORY_PROFILE)
.setOnPreferenceClickListener(new ProfileClickListener());
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_NOTIFICATIONS));
.setOnPreferenceClickListener(
new CategoryClickListener(PREFERENCE_CATEGORY_NOTIFICATIONS));
this.findPreference(PREFERENCE_CATEGORY_CONNECTIVITY)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_CONNECTIVITY));
.setOnPreferenceClickListener(
new CategoryClickListener(PREFERENCE_CATEGORY_CONNECTIVITY));
this.findPreference(PREFERENCE_CATEGORY_APPEARANCE)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_APPEARANCE));
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_APPEARANCE));
this.findPreference(PREFERENCE_CATEGORY_CHATS)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_CHATS));
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_CHATS));
this.findPreference(PREFERENCE_CATEGORY_PRIVACY)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PRIVACY));
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_PRIVACY));
this.findPreference(PREFERENCE_CATEGORY_MULTIDEVICE)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_MULTIDEVICE));
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_MULTIDEVICE));
this.findPreference(PREFERENCE_CATEGORY_ADVANCED)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_ADVANCED));
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_ADVANCED));
this.findPreference(PREFERENCE_CATEGORY_DONATE)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_DONATE));
@@ -160,7 +162,8 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
this.findPreference(PREFERENCE_CATEGORY_HELP)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_HELP));
DcHelper.getEventCenter(getActivity()).addObserver(DcContext.DC_EVENT_CONNECTIVITY_CHANGED, this);
DcHelper.getEventCenter(getActivity())
.addObserver(DcContext.DC_EVENT_CONNECTIVITY_CHANGED, this);
}
@Override
@@ -172,7 +175,9 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
public void onResume() {
super.onResume();
//noinspection ConstantConditions
((ApplicationPreferencesActivity) getActivity()).getSupportActionBar().setTitle(R.string.menu_settings);
((ApplicationPreferencesActivity) getActivity())
.getSupportActionBar()
.setTitle(R.string.menu_settings);
setCategorySummaries();
}
@@ -186,12 +191,14 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
public void handleEvent(@NonNull DcEvent event) {
if (event.getId() == DcContext.DC_EVENT_CONNECTIVITY_CHANGED) {
this.findPreference(PREFERENCE_CATEGORY_CONNECTIVITY)
.setSummary(DcHelper.getConnectivitySummary(getActivity(), getString(R.string.connectivity_connected)));
.setSummary(
DcHelper.getConnectivitySummary(
getActivity(), getString(R.string.connectivity_connected)));
}
}
private void setCategorySummaries() {
((ProfilePreference)this.findPreference(PREFERENCE_CATEGORY_PROFILE)).refresh();
((ProfilePreference) this.findPreference(PREFERENCE_CATEGORY_PROFILE)).refresh();
this.findPreference(PREFERENCE_CATEGORY_NOTIFICATIONS)
.setSummary(NotificationsPreferenceFragment.getSummary(getActivity()));
@@ -202,7 +209,9 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
this.findPreference(PREFERENCE_CATEGORY_PRIVACY)
.setSummary(PrivacyPreferenceFragment.getSummary(getActivity()));
this.findPreference(PREFERENCE_CATEGORY_CONNECTIVITY)
.setSummary(DcHelper.getConnectivitySummary(getActivity(), getString(R.string.connectivity_connected)));
.setSummary(
DcHelper.getConnectivitySummary(
getActivity(), getString(R.string.connectivity_connected)));
this.findPreference(PREFERENCE_CATEGORY_HELP)
.setSummary(AdvancedPreferenceFragment.getVersion(getActivity()));
}
@@ -219,63 +228,76 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
Fragment fragment = null;
switch (category) {
case PREFERENCE_CATEGORY_NOTIFICATIONS:
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(getActivity());
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU || notificationManager.areNotificationsEnabled()) {
fragment = new NotificationsPreferenceFragment();
} else {
new AlertDialog.Builder(getActivity())
.setTitle(R.string.notifications_disabled)
.setMessage(R.string.perm_explain_access_to_notifications_denied)
.setPositiveButton(R.string.perm_continue, (dialog, which) -> getActivity().startActivity(Permissions.getApplicationSettingsIntent(getActivity())))
.setNegativeButton(android.R.string.cancel, null)
.show();
}
break;
case PREFERENCE_CATEGORY_CONNECTIVITY:
startActivity(new Intent(getActivity(), ConnectivityActivity.class));
break;
case PREFERENCE_CATEGORY_APPEARANCE:
fragment = new AppearancePreferenceFragment();
break;
case PREFERENCE_CATEGORY_CHATS:
fragment = new ChatsPreferenceFragment();
break;
case PREFERENCE_CATEGORY_PRIVACY:
fragment = new PrivacyPreferenceFragment();
break;
case PREFERENCE_CATEGORY_MULTIDEVICE:
if (!ScreenLockUtil.applyScreenLock(getActivity(), getString(R.string.multidevice_title),
getString(R.string.multidevice_this_creates_a_qr_code) + "\n\n" + getString(R.string.enter_system_secret_to_continue),
ScreenLockUtil.REQUEST_CODE_CONFIRM_CREDENTIALS)) {
new AlertDialog.Builder(getActivity())
.setTitle(R.string.multidevice_title)
.setMessage(R.string.multidevice_this_creates_a_qr_code)
.setPositiveButton(R.string.perm_continue,
(dialog, which) -> ((ApplicationPreferencesActivity)getActivity()).showBackupProvider())
.setNegativeButton(R.string.cancel, null)
.show();
;
}
break;
case PREFERENCE_CATEGORY_ADVANCED:
fragment = new AdvancedPreferenceFragment();
break;
case PREFERENCE_CATEGORY_DONATE:
IntentUtils.showInBrowser(requireActivity(), "https://arcanechat.me/#contribute");
break;
case PREFERENCE_CATEGORY_HELP:
startActivity(new Intent(getActivity(), LocalHelpActivity.class));
break;
default:
throw new AssertionError();
case PREFERENCE_CATEGORY_NOTIFICATIONS:
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(getActivity());
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU
|| notificationManager.areNotificationsEnabled()) {
fragment = new NotificationsPreferenceFragment();
} else {
new AlertDialog.Builder(getActivity())
.setTitle(R.string.notifications_disabled)
.setMessage(R.string.perm_explain_access_to_notifications_denied)
.setPositiveButton(
R.string.perm_continue,
(dialog, which) ->
getActivity()
.startActivity(
Permissions.getApplicationSettingsIntent(getActivity())))
.setNegativeButton(android.R.string.cancel, null)
.show();
}
break;
case PREFERENCE_CATEGORY_CONNECTIVITY:
startActivity(new Intent(getActivity(), ConnectivityActivity.class));
break;
case PREFERENCE_CATEGORY_APPEARANCE:
fragment = new AppearancePreferenceFragment();
break;
case PREFERENCE_CATEGORY_CHATS:
fragment = new ChatsPreferenceFragment();
break;
case PREFERENCE_CATEGORY_PRIVACY:
fragment = new PrivacyPreferenceFragment();
break;
case PREFERENCE_CATEGORY_MULTIDEVICE:
if (!ScreenLockUtil.applyScreenLock(
getActivity(),
getString(R.string.multidevice_title),
getString(R.string.multidevice_this_creates_a_qr_code)
+ "\n\n"
+ getString(R.string.enter_system_secret_to_continue),
screenLockLauncher)) {
new AlertDialog.Builder(getActivity())
.setTitle(R.string.multidevice_title)
.setMessage(R.string.multidevice_this_creates_a_qr_code)
.setPositiveButton(
R.string.perm_continue,
(dialog, which) ->
((ApplicationPreferencesActivity) getActivity()).showBackupProvider())
.setNegativeButton(R.string.cancel, null)
.show();
;
}
break;
case PREFERENCE_CATEGORY_ADVANCED:
fragment = new AdvancedPreferenceFragment();
break;
case PREFERENCE_CATEGORY_DONATE:
IntentUtils.showInBrowser(requireActivity(), "https://arcanechat.me/#contribute");
break;
case PREFERENCE_CATEGORY_HELP:
startActivity(new Intent(getActivity(), LocalHelpActivity.class));
break;
default:
throw new AssertionError();
}
if (fragment != null) {
Bundle args = new Bundle();
fragment.setArguments(args);
FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.fragment, fragment);
fragmentTransaction.addToBackStack(null);
@@ -297,7 +319,8 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
public void onRequestPermissionsResult(
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults);
}
}
@@ -2,8 +2,6 @@ package org.thoughtcrime.securesms;
import android.content.Intent;
import org.thoughtcrime.securesms.connect.DcHelper;
public class AttachContactActivity extends ContactSelectionActivity {
public static final String CONTACT_ID_EXTRA = "contact_id_extra";
@@ -1,13 +1,11 @@
package org.thoughtcrime.securesms;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import androidx.activity.EdgeToEdge;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
@@ -15,14 +13,11 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.WindowCompat;
import androidx.fragment.app.Fragment;
import java.lang.reflect.Field;
import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.Prefs;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.lang.reflect.Field;
public abstract class BaseActionBarActivity extends AppCompatActivity {
private static final String TAG = BaseActionBarActivity.class.getSimpleName();
@@ -40,11 +35,13 @@ public abstract class BaseActionBarActivity extends AppCompatActivity {
// Only enable Edge-to-Edge if it is well supported
if (ViewUtil.isEdgeToEdgeSupported()) {
// docs says to use: WindowCompat.enableEdgeToEdge(getWindow());
// but it actually makes things worse, the next takes care of setting the 3-buttons navigation bar background
// but it actually makes things worse, the next takes care of setting the 3-buttons navigation
// bar background
EdgeToEdge.enable(this);
// force white text in status bar so it visible over background color
WindowCompat.getInsetsController(getWindow(), getWindow().getDecorView()).setAppearanceLightStatusBars(false);
WindowCompat.getInsetsController(getWindow(), getWindow().getDecorView())
.setAppearanceLightStatusBars(false);
}
}
@@ -68,14 +65,12 @@ public abstract class BaseActionBarActivity extends AppCompatActivity {
}
}
/**
* Modified from: http://stackoverflow.com/a/13098824
*/
/** Modified from: http://stackoverflow.com/a/13098824 */
private void forceOverflowMenu() {
try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
if(menuKeyField != null) {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
if (menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
@@ -97,21 +92,18 @@ public abstract class BaseActionBarActivity extends AppCompatActivity {
} else if (item == searchItem) {
; // searchItem is just always visible
} else {
item.setVisible(!visible); // if search is shown, other items are hidden - and the other way round
item.setVisible(
!visible); // if search is shown, other items are hidden - and the other way round
}
}
}
protected <T extends Fragment> T initFragment(@IdRes int target,
@NonNull T fragment)
{
protected <T extends Fragment> T initFragment(@IdRes int target, @NonNull T fragment) {
return initFragment(target, fragment, null);
}
protected <T extends Fragment> T initFragment(@IdRes int target,
@NonNull T fragment,
@Nullable Bundle extras)
{
protected <T extends Fragment> T initFragment(
@IdRes int target, @NonNull T fragment, @Nullable Bundle extras) {
Bundle args = new Bundle();
if (extras != null) {
@@ -119,9 +111,10 @@ public abstract class BaseActionBarActivity extends AppCompatActivity {
}
fragment.setArguments(args);
getSupportFragmentManager().beginTransaction()
.replace(target, fragment)
.commitAllowingStateLoss();
getSupportFragmentManager()
.beginTransaction()
.replace(target, fragment)
.commitAllowingStateLoss();
return fragment;
}
}
@@ -6,42 +6,37 @@ import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import chat.delta.rpc.Rpc;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcMsg;
import java.util.HashSet;
import java.util.Set;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.HashSet;
import java.util.Set;
import chat.delta.rpc.Rpc;
public abstract class BaseConversationItem extends LinearLayout
implements BindableConversationItem
{
implements BindableConversationItem {
static final long PULSE_HIGHLIGHT_MILLIS = 500;
protected DcMsg messageRecord;
protected DcChat dcChat;
protected TextView bodyText;
protected DcMsg messageRecord;
protected DcChat dcChat;
protected TextView bodyText;
protected final Context context;
protected final DcContext dcContext;
protected final Context context;
protected final DcContext dcContext;
protected final Rpc rpc;
protected Recipient conversationRecipient;
protected Recipient conversationRecipient;
protected @NonNull Set<DcMsg> batchSelected = new HashSet<>();
protected @NonNull Set<DcMsg> batchSelected = new HashSet<>();
protected final PassthroughClickListener passthroughClickListener = new PassthroughClickListener();
protected final PassthroughClickListener passthroughClickListener =
new PassthroughClickListener();
public BaseConversationItem(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -50,32 +45,32 @@ public abstract class BaseConversationItem extends LinearLayout
this.rpc = DcHelper.getRpc(context);
}
protected void bind(@NonNull DcMsg messageRecord,
@NonNull DcChat dcChat,
@NonNull Set<DcMsg> batchSelected,
boolean pulseHighlight,
@NonNull Recipient conversationRecipient)
{
this.messageRecord = messageRecord;
this.dcChat = dcChat;
this.batchSelected = batchSelected;
this.conversationRecipient = conversationRecipient;
protected void bindPartial(
@NonNull DcMsg messageRecord,
@NonNull DcChat dcChat,
@NonNull Set<DcMsg> batchSelected,
boolean pulseHighlight,
@NonNull Recipient conversationRecipient) {
this.messageRecord = messageRecord;
this.dcChat = dcChat;
this.batchSelected = batchSelected;
this.conversationRecipient = conversationRecipient;
setInteractionState(messageRecord, pulseHighlight);
}
protected void setInteractionState(DcMsg messageRecord, boolean pulseHighlight) {
final int[] attributes = new int[] {
R.attr.conversation_item_background,
R.attr.conversation_item_background_animated,
};
final int[] attributes =
new int[] {
R.attr.conversation_item_background, R.attr.conversation_item_background_animated,
};
if (batchSelected.contains(messageRecord)) {
final TypedArray attrs = context.obtainStyledAttributes(attributes);
final TypedArray attrs = context.obtainStyledAttributes(attributes);
ViewUtil.setBackground(this, attrs.getDrawable(0));
attrs.recycle();
setSelected(true);
} else if (pulseHighlight) {
final TypedArray attrs = context.obtainStyledAttributes(attributes);
final TypedArray attrs = context.obtainStyledAttributes(attributes);
ViewUtil.setBackground(this, attrs.getDrawable(1));
attrs.recycle();
setSelected(true);
@@ -92,15 +87,16 @@ public abstract class BaseConversationItem extends LinearLayout
protected boolean shouldInterceptClicks(DcMsg messageRecord) {
return batchSelected.isEmpty()
&& (messageRecord.isFailed()
|| messageRecord.getInfoType() == DcMsg.DC_INFO_CHAT_E2EE
|| messageRecord.getInfoType() == DcMsg.DC_INFO_PROTECTION_ENABLED
|| messageRecord.getInfoType() == DcMsg.DC_INFO_INVALID_UNENCRYPTED_MAIL);
&& (messageRecord.isFailed()
|| messageRecord.getInfoType() == DcMsg.DC_INFO_CHAT_E2EE
|| messageRecord.getInfoType() == DcMsg.DC_INFO_PROTECTION_ENABLED
|| messageRecord.getInfoType() == DcMsg.DC_INFO_INVALID_UNENCRYPTED_MAIL);
}
protected void onAccessibilityClick() {}
protected class PassthroughClickListener implements View.OnLongClickListener, View.OnClickListener {
protected class PassthroughClickListener
implements View.OnLongClickListener, View.OnClickListener {
@Override
public boolean onLongClick(View v) {
@@ -126,6 +122,8 @@ public abstract class BaseConversationItem extends LinearLayout
public void onClick(View v) {
if (!shouldInterceptClicks(messageRecord) && parent != null) {
// The click workaround on ConversationItem shall be revised.
// In fact, it is probably better rethinking accessibility approach for the items.
if (batchSelected.isEmpty() && Util.isTouchExplorationEnabled(context)) {
BaseConversationItem.this.onAccessibilityClick();
}
@@ -135,13 +133,15 @@ public abstract class BaseConversationItem extends LinearLayout
TextView detailsText = view.findViewById(R.id.details_text);
detailsText.setText(messageRecord.getError());
AlertDialog d = new AlertDialog.Builder(context)
AlertDialog d =
new AlertDialog.Builder(context)
.setView(view)
.setTitle(R.string.error)
.setPositiveButton(R.string.ok, null)
.create();
d.show();
} else if (messageRecord.getInfoType() == DcMsg.DC_INFO_CHAT_E2EE || messageRecord.getInfoType() == DcMsg.DC_INFO_PROTECTION_ENABLED) {
} else if (messageRecord.getInfoType() == DcMsg.DC_INFO_CHAT_E2EE
|| messageRecord.getInfoType() == DcMsg.DC_INFO_PROTECTION_ENABLED) {
DcHelper.showProtectionEnabledDialog(context);
} else if (messageRecord.getInfoType() == DcMsg.DC_INFO_INVALID_UNENCRYPTED_MAIL) {
DcHelper.showInvalidUnencryptedDialog(context);
@@ -1,14 +1,14 @@
package org.thoughtcrime.securesms;
import androidx.recyclerview.widget.RecyclerView;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public abstract class BaseConversationListAdapter<T extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<T> {
protected final Set<Long> batchSet = Collections.synchronizedSet(new HashSet<Long>());
protected boolean batchMode = false;
public abstract class BaseConversationListAdapter<T extends RecyclerView.ViewHolder>
extends RecyclerView.Adapter<T> {
protected final Set<Long> batchSet = Collections.synchronizedSet(new HashSet<Long>());
protected boolean batchMode = false;
public abstract void selectAllThreads();
@@ -17,7 +17,6 @@ import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
@@ -27,36 +26,36 @@ import androidx.core.content.pm.ShortcutInfoCompat;
import androidx.core.content.pm.ShortcutManagerCompat;
import androidx.core.graphics.drawable.IconCompat;
import androidx.fragment.app.Fragment;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContact;
import com.b44t.messenger.DcContext;
import com.google.android.material.snackbar.Snackbar;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.thoughtcrime.securesms.components.registration.PulsingFloatingActionButton;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.connect.DirectShareUtil;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.SendRelayedMessageUtil;
import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.task.SnackbarAsyncTask;
import org.thoughtcrime.securesms.util.views.ProgressDialog;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
public abstract class BaseConversationListFragment extends Fragment implements ActionMode.Callback {
protected ActionMode actionMode;
protected PulsingFloatingActionButton fab;
protected abstract boolean offerToArchive();
protected abstract void setFabVisibility(boolean isActionMode);
protected abstract BaseConversationListAdapter getListAdapter();
protected void onItemClick(long chatId) {
if (actionMode == null) {
((ConversationSelectedListener) requireActivity()).onCreateConversation((int)chatId);
((ConversationSelectedListener) requireActivity()).onCreateConversation((int) chatId);
} else {
BaseConversationListAdapter adapter = getListAdapter();
adapter.toggleThreadInBatchSet(chatId);
@@ -71,8 +70,9 @@ public abstract class BaseConversationListFragment extends Fragment implements A
adapter.notifyDataSetChanged();
}
}
public void onItemLongClick(long chatId) {
actionMode = ((AppCompatActivity)requireActivity()).startSupportActionMode(this);
actionMode = ((AppCompatActivity) requireActivity()).startSupportActionMode(this);
if (actionMode != null) {
getListAdapter().initializeBatchMode(true);
@@ -89,36 +89,54 @@ public abstract class BaseConversationListFragment extends Fragment implements A
Intent intent = new Intent(getActivity(), NewConversationActivity.class);
if (isRelayingMessageContent(getActivity())) {
if (isActionMode) {
fab.setOnClickListener(v -> {
final Set<Long> selectedChats = getListAdapter().getBatchSelections();
ArrayList<Uri> uris = getSharedUris(getActivity());
String message;
if (isForwarding(getActivity())) {
message = String.format(Util.getLocale(), getString(R.string.ask_forward_multiple), selectedChats.size());
} else if (!uris.isEmpty()) {
message = String.format(Util.getLocale(), getString(R.string.ask_send_files_to_selected_chats), uris.size(), selectedChats.size());
} else {
message = String.format(Util.getLocale(), getString(R.string.share_text_multiple_chats), selectedChats.size(), getSharedText(getActivity()));
}
fab.setOnClickListener(
v -> {
final Set<Long> selectedChats = getListAdapter().getBatchSelections();
ArrayList<Uri> uris = getSharedUris(getActivity());
String message;
if (isForwarding(getActivity())) {
message =
String.format(
Util.getLocale(),
getString(R.string.ask_forward_multiple),
selectedChats.size());
} else if (!uris.isEmpty()) {
message =
String.format(
Util.getLocale(),
getString(R.string.ask_send_files_to_selected_chats),
uris.size(),
selectedChats.size());
} else {
message =
String.format(
Util.getLocale(),
getString(R.string.share_text_multiple_chats),
selectedChats.size(),
getSharedText(getActivity()));
}
Context context = getContext();
if (context != null) {
if (SendRelayedMessageUtil.containsVideoType(context, uris)) {
message += "\n\n" + getString(R.string.videos_sent_without_recoding);
}
new AlertDialog.Builder(context)
Context context = getContext();
if (context != null) {
if (SendRelayedMessageUtil.containsVideoType(context, uris)) {
message += "\n\n" + getString(R.string.videos_sent_without_recoding);
}
new AlertDialog.Builder(context)
.setMessage(message)
.setCancelable(false)
.setNegativeButton(android.R.string.cancel, ((dialog, which) -> {}))
.setPositiveButton(R.string.menu_send, (dialog, which) -> {
SendRelayedMessageUtil.immediatelyRelay(getActivity(), selectedChats.toArray(new Long[selectedChats.size()]));
actionMode.finish();
actionMode = null;
getActivity().finish();
})
.setPositiveButton(
R.string.menu_send,
(dialog, which) -> {
SendRelayedMessageUtil.immediatelyRelay(
getActivity(), selectedChats.toArray(new Long[selectedChats.size()]));
actionMode.finish();
actionMode = null;
getActivity().finish();
})
.show();
}
});
}
});
} else {
acquireRelayMessageContent(getActivity(), intent);
fab.setOnClickListener(v -> requireActivity().startActivity(intent));
@@ -132,8 +150,8 @@ public abstract class BaseConversationListFragment extends Fragment implements A
DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedChats = getListAdapter().getBatchSelections();
for (long chatId : selectedChats) {
DcChat dcChat = dcContext.getChat((int)chatId);
if (dcChat.getVisibility()!=DcChat.DC_CHAT_VISIBILITY_PINNED) {
DcChat dcChat = dcContext.getChat((int) chatId);
if (dcChat.getVisibility() != DcChat.DC_CHAT_VISIBILITY_PINNED) {
return true;
}
}
@@ -144,7 +162,7 @@ public abstract class BaseConversationListFragment extends Fragment implements A
DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedChats = getListAdapter().getBatchSelections();
for (long chatId : selectedChats) {
DcChat dcChat = dcContext.getChat((int)chatId);
DcChat dcChat = dcContext.getChat((int) chatId);
if (!dcChat.isMuted()) {
return true;
}
@@ -153,12 +171,14 @@ public abstract class BaseConversationListFragment extends Fragment implements A
}
private void handlePinAllSelected() {
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations = new HashSet<Long>(getListAdapter().getBatchSelections());
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations =
new HashSet<Long>(getListAdapter().getBatchSelections());
boolean doPin = areSomeSelectedChatsUnpinned();
for (long chatId : selectedConversations) {
dcContext.setChatVisibility((int)chatId,
doPin? DcChat.DC_CHAT_VISIBILITY_PINNED : DcChat.DC_CHAT_VISIBILITY_NORMAL);
dcContext.setChatVisibility(
(int) chatId,
doPin ? DcChat.DC_CHAT_VISIBILITY_PINNED : DcChat.DC_CHAT_VISIBILITY_NORMAL);
}
if (actionMode != null) {
actionMode.finish();
@@ -167,23 +187,26 @@ public abstract class BaseConversationListFragment extends Fragment implements A
}
private void handleMuteAllSelected() {
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations = new HashSet<Long>(getListAdapter().getBatchSelections());
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations =
new HashSet<Long>(getListAdapter().getBatchSelections());
if (areSomeSelectedChatsUnmuted()) {
MuteDialog.show(getActivity(), duration -> {
for (long chatId : selectedConversations) {
dcContext.setChatMuteDuration((int)chatId, duration);
}
MuteDialog.show(
getActivity(),
duration -> {
for (long chatId : selectedConversations) {
dcContext.setChatMuteDuration((int) chatId, duration);
}
if (actionMode != null) {
actionMode.finish();
actionMode = null;
}
});
if (actionMode != null) {
actionMode.finish();
actionMode = null;
}
});
} else {
// unmute
for (long chatId : selectedConversations) {
dcContext.setChatMuteDuration((int)chatId, 0);
dcContext.setChatMuteDuration((int) chatId, 0);
}
if (actionMode != null) {
@@ -194,10 +217,11 @@ public abstract class BaseConversationListFragment extends Fragment implements A
}
private void handleMarknoticedSelected() {
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations = new HashSet<Long>(getListAdapter().getBatchSelections());
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations =
new HashSet<Long>(getListAdapter().getBatchSelections());
for (long chatId : selectedConversations) {
dcContext.marknoticedChat((int)chatId);
dcContext.marknoticedChat((int) chatId);
}
if (actionMode != null) {
actionMode.finish();
@@ -207,22 +231,21 @@ public abstract class BaseConversationListFragment extends Fragment implements A
@SuppressLint("StaticFieldLeak")
private void handleArchiveAllSelected() {
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations = new HashSet<Long>(getListAdapter().getBatchSelections());
final boolean archive = offerToArchive();
final DcContext dcContext = DcHelper.getContext(requireActivity());
final Set<Long> selectedConversations =
new HashSet<Long>(getListAdapter().getBatchSelections());
final boolean archive = offerToArchive();
int snackBarTitleId;
if (archive) snackBarTitleId = R.plurals.chat_archived;
else snackBarTitleId = R.plurals.chat_unarchived;
else snackBarTitleId = R.plurals.chat_unarchived;
int count = selectedConversations.size();
int count = selectedConversations.size();
String snackBarTitle = getResources().getQuantityString(snackBarTitleId, count, count);
new SnackbarAsyncTask<Void>(getView(), snackBarTitle,
getString(R.string.undo),
Snackbar.LENGTH_LONG, true)
{
new SnackbarAsyncTask<Void>(
getView(), snackBarTitle, getString(R.string.undo), Snackbar.LENGTH_LONG, true) {
@Override
protected void onPostExecute(Void result) {
@@ -237,16 +260,18 @@ public abstract class BaseConversationListFragment extends Fragment implements A
@Override
protected void executeAction(@Nullable Void parameter) {
for (long chatId : selectedConversations) {
dcContext.setChatVisibility((int)chatId,
archive? DcChat.DC_CHAT_VISIBILITY_ARCHIVED : DcChat.DC_CHAT_VISIBILITY_NORMAL);
dcContext.setChatVisibility(
(int) chatId,
archive ? DcChat.DC_CHAT_VISIBILITY_ARCHIVED : DcChat.DC_CHAT_VISIBILITY_NORMAL);
}
}
@Override
protected void reverseAction(@Nullable Void parameter) {
for (long threadId : selectedConversations) {
dcContext.setChatVisibility((int)threadId,
archive? DcChat.DC_CHAT_VISIBILITY_NORMAL : DcChat.DC_CHAT_VISIBILITY_ARCHIVED);
dcContext.setChatVisibility(
(int) threadId,
archive ? DcChat.DC_CHAT_VISIBILITY_NORMAL : DcChat.DC_CHAT_VISIBILITY_ARCHIVED);
}
}
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
@@ -262,51 +287,73 @@ public abstract class BaseConversationListFragment extends Fragment implements A
final String alertText;
if (chatsCount == 1) {
long chatId = selectedChats.iterator().next();
alertText = activity.getResources().getString(R.string.ask_delete_named_chat, dcContext.getChat((int)chatId).getName());
alertText =
activity
.getResources()
.getString(R.string.ask_delete_named_chat, dcContext.getChat((int) chatId).getName());
} else {
alertText = activity.getResources().getQuantityString(R.plurals.ask_delete_chat, chatsCount, chatsCount);
alertText =
activity
.getResources()
.getQuantityString(R.plurals.ask_delete_chat, chatsCount, chatsCount);
}
String alertButton = getString(R.string.delete_for_me);
for (long chatId : selectedChats) {
if (dcContext.getChat((int) chatId).shallLeaveBeforeDelete(dcContext)) {
alertButton = getString(R.string.menu_leave_and_delete);
break;
}
}
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
alert.setMessage(alertText);
alert.setCancelable(true);
alert.setPositiveButton(R.string.delete, (dialog, which) -> {
alert.setPositiveButton(
alertButton,
(dialog, which) -> {
if (!selectedChats.isEmpty()) {
new AsyncTask<Void, Void, Void>() {
private ProgressDialog dialog;
if (!selectedChats.isEmpty()) {
new AsyncTask<Void, Void, Void>() {
private ProgressDialog dialog;
@Override
protected void onPreExecute() {
dialog =
ProgressDialog.show(
getActivity(),
"",
requireActivity().getString(R.string.one_moment),
true,
false);
}
@Override
protected void onPreExecute() {
dialog = ProgressDialog.show(getActivity(),
"",
requireActivity().getString(R.string.one_moment),
true, false);
@Override
protected Void doInBackground(Void... params) {
int accountId = dcContext.getAccountId();
for (long chatId : selectedChats) {
DcHelper.getNotificationCenter(requireContext())
.removeNotifications(accountId, (int) chatId);
if (dcContext.getChat((int) chatId).shallLeaveBeforeDelete(dcContext)) {
dcContext.removeContactFromChat((int) chatId, DcContact.DC_CONTACT_ID_SELF);
}
dcContext.deleteChat((int) chatId);
DirectShareUtil.clearShortcut(requireContext(), (int) chatId);
}
return null;
}
@Override
protected void onPostExecute(Void result) {
dialog.dismiss();
if (actionMode != null) {
actionMode.finish();
actionMode = null;
}
}
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@Override
protected Void doInBackground(Void... params) {
int accountId = dcContext.getAccountId();
for (long chatId : selectedChats) {
DcHelper.getNotificationCenter(requireContext()).removeNotifications(accountId, (int) chatId);
dcContext.deleteChat((int) chatId);
DirectShareUtil.clearShortcut(requireContext(), (int) chatId);
}
return null;
}
@Override
protected void onPostExecute(Void result) {
dialog.dismiss();
if (actionMode != null) {
actionMode.finish();
actionMode = null;
}
}
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
});
alert.setNegativeButton(android.R.string.cancel, null);
AlertDialog dialog = alert.show();
@@ -331,22 +378,30 @@ public abstract class BaseConversationListFragment extends Fragment implements A
intent.putExtra(ShareActivity.EXTRA_CHAT_ID, chat.getId());
Recipient recipient = new Recipient(activity, chat);
Util.runOnAnyBackgroundThread(() -> {
Bitmap avatar = DirectShareUtil.getIconForShortcut(activity, recipient);
ShortcutInfoCompat shortcutInfoCompat = new ShortcutInfoCompat.Builder(activity, "chat-" + dcContext.getAccountId() + "-" + chat.getId())
.setShortLabel(chat.getName())
.setIcon(IconCompat.createWithAdaptiveBitmap(avatar))
.setIntent(intent)
.build();
Util.runOnMain(() -> {
if (!ShortcutManagerCompat.requestPinShortcut(activity, shortcutInfoCompat, null)) {
Toast.makeText(activity, "ErrAddToHomescreen: requestPinShortcut() failed", Toast.LENGTH_LONG).show();
} else if (actionMode != null) {
actionMode.finish();
actionMode = null;
}
});
});
Util.runOnAnyBackgroundThread(
() -> {
Bitmap avatar = DirectShareUtil.getIconForShortcut(activity, recipient);
ShortcutInfoCompat shortcutInfoCompat =
new ShortcutInfoCompat.Builder(
activity, "chat-" + dcContext.getAccountId() + "-" + chat.getId())
.setShortLabel(chat.getName())
.setIcon(IconCompat.createWithAdaptiveBitmap(avatar))
.setIntent(intent)
.build();
Util.runOnMain(
() -> {
if (!ShortcutManagerCompat.requestPinShortcut(activity, shortcutInfoCompat, null)) {
Toast.makeText(
activity,
"ErrAddToHomescreen: requestPinShortcut() failed",
Toast.LENGTH_LONG)
.show();
} else if (actionMode != null) {
actionMode.finish();
actionMode = null;
}
});
});
}
private void updateActionModeItems(Menu menu) {
@@ -356,11 +411,11 @@ public abstract class BaseConversationListFragment extends Fragment implements A
menu.findItem(R.id.menu_add_to_home_screen).setVisible(selectedCount == 1);
MenuItem archiveItem = menu.findItem(R.id.menu_archive_selected);
if (offerToArchive()) {
archiveItem.setIcon(R.drawable.ic_archive_white_24dp);
archiveItem.setTitle(R.string.menu_archive_chat);
archiveItem.setIcon(R.drawable.ic_archive_white_24dp);
archiveItem.setTitle(R.string.menu_archive_chat);
} else {
archiveItem.setIcon(R.drawable.ic_unarchive_white_24dp);
archiveItem.setTitle(R.string.menu_unarchive_chat);
archiveItem.setIcon(R.drawable.ic_unarchive_white_24dp);
archiveItem.setTitle(R.string.menu_unarchive_chat);
}
MenuItem pinItem = menu.findItem(R.id.menu_pin_selected);
if (areSomeSelectedChatsUnpinned()) {
@@ -383,7 +438,8 @@ public abstract class BaseConversationListFragment extends Fragment implements A
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
if (isRelayingMessageContent(getActivity())) {
if (ShareUtil.getSharedContactId(getActivity()) != 0) {
return false; // no sharing of a contact to multiple recipients at the same time, we can reconsider when that becomes a real-world need
return false; // no sharing of a contact to multiple recipients at the same time, we can
// reconsider when that becomes a real-world need
}
Context context = getContext();
if (context != null) {
@@ -451,6 +507,7 @@ public abstract class BaseConversationListFragment extends Fragment implements A
public interface ConversationSelectedListener {
void onCreateConversation(int chatId);
void onSwitchToArchive();
}
}
@@ -2,22 +2,24 @@ package org.thoughtcrime.securesms;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcMsg;
import java.util.Set;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.components.audioplay.AudioView;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.recipients.Recipient;
import java.util.Set;
public interface BindableConversationItem extends Unbindable {
void bind(@NonNull DcMsg messageRecord,
@NonNull DcChat dcChat,
@NonNull GlideRequests glideRequests,
@NonNull Set<DcMsg> batchSelected,
@NonNull Recipient recipients,
boolean pulseHighlight);
void bind(
@NonNull DcMsg messageRecord,
@NonNull DcChat dcChat,
@NonNull GlideRequests glideRequests,
@NonNull Set<DcMsg> batchSelected,
@NonNull Recipient recipients,
boolean pulseHighlight,
@Nullable AudioPlaybackViewModel playbackViewModel,
AudioView.OnActionListener audioPlayPauseListener);
DcMsg getMessageRecord();
@@ -25,9 +27,15 @@ public interface BindableConversationItem extends Unbindable {
interface EventListener {
void onQuoteClicked(DcMsg messageRecord);
void onJumpToOriginalClicked(DcMsg messageRecord);
void onShowFullClicked(DcMsg messageRecord);
void onDownloadClicked(DcMsg messageRecord);
void onReactionClicked(DcMsg messageRecord);
void onStickerClicked(DcMsg messageRecord);
}
}
@@ -1,19 +1,18 @@
package org.thoughtcrime.securesms;
import androidx.annotation.NonNull;
import com.b44t.messenger.DcLot;
import java.util.Set;
import org.thoughtcrime.securesms.database.model.ThreadRecord;
import org.thoughtcrime.securesms.mms.GlideRequests;
import java.util.Set;
public interface BindableConversationListItem extends Unbindable {
public void bind(@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads, boolean batchMode);
public void bind(
@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads,
boolean batchMode);
}
@@ -6,7 +6,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
@@ -14,10 +13,8 @@ import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import org.thoughtcrime.securesms.connect.DcContactsLoader;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
@@ -39,17 +36,18 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home: finish(); return true;
case android.R.id.home:
finish();
return true;
}
return false;
}
public static class BlockedAndShareContactsFragment
extends Fragment
implements LoaderManager.LoaderCallbacks<DcContactsLoader.Ret>,
DcEventCenter.DcEventDelegate, ContactSelectionListAdapter.ItemClickListener {
public static class BlockedAndShareContactsFragment extends Fragment
implements LoaderManager.LoaderCallbacks<DcContactsLoader.Ret>,
DcEventCenter.DcEventDelegate,
ContactSelectionListAdapter.ItemClickListener {
private RecyclerView recyclerView;
private TextView emptyStateView;
@@ -57,7 +55,7 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false);
recyclerView = ViewUtil.findById(view, R.id.recycler_view);
recyclerView = ViewUtil.findById(view, R.id.recycler_view);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
// add padding to avoid content hidden behind system bars
@@ -81,11 +79,8 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
}
private void initializeAdapter() {
ContactSelectionListAdapter adapter = new ContactSelectionListAdapter(getActivity(),
GlideApp.with(this),
this,
false,
false);
ContactSelectionListAdapter adapter =
new ContactSelectionListAdapter(getActivity(), GlideApp.with(this), this, false, false);
recyclerView.setAdapter(adapter);
}
@@ -112,7 +107,7 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
@Override
public void handleEvent(@NonNull DcEvent event) {
if (event.getId()==DcContext.DC_EVENT_CONTACTS_CHANGED) {
if (event.getId() == DcContext.DC_EVENT_CONTACTS_CHANGED) {
restartLoader();
}
}
@@ -128,10 +123,12 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
@Override
public void onItemClick(ContactSelectionListItem item, boolean handleActionMode) {
new AlertDialog.Builder(getActivity())
.setMessage(R.string.ask_unblock_contact)
.setCancelable(true)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(R.string.menu_unblock_contact, (dialog, which) -> unblockContact(item.getContactId())).show();
.setMessage(R.string.ask_unblock_contact)
.setCancelable(true)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(
R.string.menu_unblock_contact, (dialog, which) -> unblockContact(item.getContactId()))
.show();
}
private void unblockContact(int contactId) {
@@ -143,5 +140,4 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
@Override
public void onItemLongClick(ContactSelectionListItem view) {}
}
}
@@ -2,12 +2,9 @@ package org.thoughtcrime.securesms;
import android.os.Bundle;
import android.view.Menu;
import androidx.annotation.NonNull;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
@@ -35,8 +32,10 @@ public class ConnectivityActivity extends WebViewActivity implements DcEventCent
}
private void refresh() {
final String connectivityHtml = DcHelper.getContext(this).getConnectivityHtml()
.replace("</style>", " html { color-scheme: dark light; }</style>");
final String connectivityHtml =
DcHelper.getContext(this)
.getConnectivityHtml()
.replace("</style>", " html { color-scheme: dark light; }</style>");
webView.loadDataWithBaseURL(null, connectivityHtml, "text/html", "utf-8", null);
}
@@ -21,7 +21,6 @@ import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import java.util.ArrayList;
import java.util.List;
@@ -29,11 +28,11 @@ import java.util.List;
* Activity container for selecting a list of contacts.
*
* @author Moxie Marlinspike
*
*/
public class ContactMultiSelectionActivity extends ContactSelectionActivity {
public static final String CONTACTS_EXTRA = "contacts_extra";
public static final String DESELECTED_CONTACTS_EXTRA = "deselected_contacts_extra";
@Override
protected void onCreate(Bundle icicle, boolean ready) {
@@ -71,7 +70,10 @@ public class ContactMultiSelectionActivity extends ContactSelectionActivity {
private void saveSelection() {
Intent resultIntent = getIntent();
List<Integer> selectedContacts = contactsFragment.getSelectedContacts();
List<Integer> deselectedContacts = contactsFragment.getDeselectedContacts();
resultIntent.putIntegerArrayListExtra(CONTACTS_EXTRA, new ArrayList<>(selectedContacts));
resultIntent.putIntegerArrayListExtra(
DESELECTED_CONTACTS_EXTRA, new ArrayList<>(deselectedContacts));
setResult(RESULT_OK, resultIntent);
}
}
@@ -18,7 +18,6 @@ package org.thoughtcrime.securesms;
import android.os.Bundle;
import android.view.MenuItem;
import org.thoughtcrime.securesms.components.ContactFilterToolbar;
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme;
import org.thoughtcrime.securesms.util.ViewUtil;
@@ -27,11 +26,9 @@ import org.thoughtcrime.securesms.util.ViewUtil;
* Base activity container for selecting a list of contacts.
*
* @author Moxie Marlinspike
*
*/
public abstract class ContactSelectionActivity extends PassphraseRequiredActionBarActivity
implements ContactSelectionListFragment.OnContactSelectedListener
{
implements ContactSelectionListFragment.OnContactSelectedListener {
private static final String TAG = ContactSelectionActivity.class.getSimpleName();
protected ContactSelectionListFragment contactsFragment;
@@ -61,7 +58,7 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
this.toolbar = ViewUtil.findById(this, R.id.toolbar);
setSupportActionBar(toolbar);
assert getSupportActionBar() != null;
assert getSupportActionBar() != null;
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setIcon(null);
@@ -69,7 +66,9 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
}
private void initializeResources() {
contactsFragment = (ContactSelectionListFragment) getSupportFragmentManager().findFragmentById(R.id.contact_selection_list_fragment);
contactsFragment =
(ContactSelectionListFragment)
getSupportFragmentManager().findFragmentById(R.id.contact_selection_list_fragment);
contactsFragment.setOnContactSelectedListener(this);
}
@@ -81,8 +80,9 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItemSelected(item);
switch (item.getItemId()) {
case android.R.id.home: super.onBackPressed(); return true;
if (item.getItemId() == android.R.id.home) {
getOnBackPressedDispatcher().onBackPressed();
return true;
}
return false;
@@ -16,12 +16,12 @@
*/
package org.thoughtcrime.securesms;
import static org.thoughtcrime.securesms.util.ShareUtil.isRelayingMessageContent;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.SparseIntArray;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -29,7 +29,9 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
@@ -39,11 +41,14 @@ import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcContact;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.thoughtcrime.securesms.connect.DcContactsLoader;
import org.thoughtcrime.securesms.connect.DcEventCenter;
import org.thoughtcrime.securesms.connect.DcHelper;
@@ -55,45 +60,52 @@ import org.thoughtcrime.securesms.permissions.Permissions;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
/**
* Fragment for selecting a one or more contacts from a list.
*
* @author Moxie Marlinspike
*
*/
public class ContactSelectionListFragment extends Fragment
implements LoaderManager.LoaderCallbacks<DcContactsLoader.Ret>,
DcEventCenter.DcEventDelegate
{
public class ContactSelectionListFragment extends Fragment
implements LoaderManager.LoaderCallbacks<DcContactsLoader.Ret>, DcEventCenter.DcEventDelegate {
private static final String TAG = ContactSelectionListFragment.class.getSimpleName();
public static final String MULTI_SELECT = "multi_select";
public static final String MULTI_SELECT = "multi_select";
public static final String SELECT_UNENCRYPTED_EXTRA = "select_unencrypted_extra";
public static final String ALLOW_CREATION = "allow_creation";
public static final String PRESELECTED_CONTACTS = "preselected_contacts";
public static final int CONTACT_ADDR_RESULT_CODE = 61123;
private DcContext dcContext;
private Set<Integer> selectedContacts;
private Set<Integer> selectedContacts;
private Set<Integer> deselectedContacts;
private OnContactSelectedListener onContactSelectedListener;
private String cursorFilter;
private RecyclerView recyclerView;
private ActionMode actionMode;
private ActionMode.Callback actionModeCallback;
private String cursorFilter;
private RecyclerView recyclerView;
private TextView emptyView;
private ActionMode actionMode;
private ActionMode.Callback actionModeCallback;
private ActivityResultLauncher<Intent> newContactLauncher;
@Override
public void onActivityCreated(Bundle icicle) {
super.onActivityCreated(icicle);
public void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle);
dcContext = DcHelper.getContext(getActivity());
DcHelper.getEventCenter(getActivity()).addObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
initializeCursor();
dcContext = DcHelper.getContext(requireContext());
newContactLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == Activity.RESULT_OK && result.getData() != null) {
int contactId =
result.getData().getIntExtra(NewContactActivity.CONTACT_ID_EXTRA, 0);
if (contactId != 0) {
selectedContacts.add(contactId);
deselectedContacts.remove(contactId);
}
LoaderManager.getInstance(this)
.restartLoader(0, null, ContactSelectionListFragment.this);
}
});
}
@Override
@@ -109,71 +121,75 @@ public class ContactSelectionListFragment extends Fragment
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false);
recyclerView = ViewUtil.findById(view, R.id.recycler_view);
recyclerView = ViewUtil.findById(view, R.id.recycler_view);
emptyView = ViewUtil.findById(view, android.R.id.empty);
// add padding to avoid content hidden behind system bars
ViewUtil.applyWindowInsets(recyclerView, true, false, true, true);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
actionModeCallback = new ActionMode.Callback() {
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
MenuInflater inflater = getActivity().getMenuInflater();
inflater.inflate(R.menu.contact_list, menu);
setCorrectMenuVisibility(menu);
actionMode.setTitle("1");
return true;
}
actionModeCallback =
new ActionMode.Callback() {
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
MenuInflater inflater = getActivity().getMenuInflater();
inflater.inflate(R.menu.contact_list, menu);
menu.findItem(R.id.menu_delete_selected).setVisible(!isMulti());
updateActionModeState(actionMode);
return true;
}
@Override
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
return false;
}
@Override
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
return false;
}
@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
int itemId = menuItem.getItemId();
if (itemId == R.id.menu_select_all) {
handleSelectAll();
return true;
} else if (itemId == R.id.menu_view_profile) {
handleViewProfile();
return true;
} else if (itemId == R.id.menu_delete_selected) {
handleDeleteSelected();
return true;
}
return false;
}
@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
int itemId = menuItem.getItemId();
if (itemId == R.id.menu_select_all) {
handleSelectAll();
return true;
} else if (itemId == R.id.menu_view_profile) {
handleViewProfile();
return true;
} else if (itemId == R.id.menu_delete_selected) {
handleDeleteSelected();
return true;
}
return false;
}
@Override
public void onDestroyActionMode(ActionMode actionMode) {
ContactSelectionListFragment.this.actionMode = null;
getContactSelectionListAdapter().resetActionModeSelection();
}
};
@Override
public void onDestroyActionMode(ActionMode actionMode) {
ContactSelectionListFragment.this.actionMode = null;
getContactSelectionListAdapter().resetActionModeSelection();
}
};
DcHelper.getEventCenter(requireActivity())
.addObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
initializeCursor();
return view;
}
private void handleSelectAll() {
getContactSelectionListAdapter().selectAll();
updateActionModeTitle();
updateActionModeState(actionMode);
}
private void updateActionModeTitle() {
actionMode.setTitle(String.valueOf(getContactSelectionListAdapter().getActionModeSelection().size()));
}
private void setCorrectMenuVisibility(Menu menu) {
ContactSelectionListAdapter adapter = getContactSelectionListAdapter();
if (adapter.getActionModeSelection().size() > 1) {
menu.findItem(R.id.menu_view_profile).setVisible(false);
private void updateActionModeState(ActionMode actionMode) {
int size = getContactSelectionListAdapter().getActionModeSelection().size();
if (size == 0) {
actionMode.finish();
} else {
menu.findItem(R.id.menu_view_profile).setVisible(true);
actionMode.getMenu().findItem(R.id.menu_view_profile).setVisible(size == 1);
actionMode.setTitle(String.valueOf(size));
}
}
@@ -189,22 +205,28 @@ public class ContactSelectionListFragment extends Fragment
}
private void handleDeleteSelected() {
AlertDialog dialog = new AlertDialog.Builder(getActivity())
.setMessage(R.string.ask_delete_contacts)
.setPositiveButton(R.string.delete, (d, i) -> {
ContactSelectionListAdapter adapter = getContactSelectionListAdapter();
final SparseIntArray actionModeSelection = adapter.getActionModeSelection().clone();
new Thread(() -> {
for (int index = 0; index < actionModeSelection.size(); index++) {
int contactId = actionModeSelection.valueAt(index);
dcContext.deleteContact(contactId);
}
}).start();
adapter.resetActionModeSelection();
actionMode.finish();
})
.setNegativeButton(R.string.cancel, null)
.show();
AlertDialog dialog =
new AlertDialog.Builder(getActivity())
.setMessage(R.string.ask_delete_contacts)
.setPositiveButton(
R.string.delete,
(d, i) -> {
ContactSelectionListAdapter adapter = getContactSelectionListAdapter();
final SparseIntArray actionModeSelection =
adapter.getActionModeSelection().clone();
new Thread(
() -> {
for (int index = 0; index < actionModeSelection.size(); index++) {
int contactId = actionModeSelection.valueAt(index);
dcContext.deleteContact(contactId);
}
})
.start();
adapter.resetActionModeSelection();
actionMode.finish();
})
.setNegativeButton(R.string.cancel, null)
.show();
Util.redPositiveButton(dialog);
}
@@ -213,7 +235,8 @@ public class ContactSelectionListFragment extends Fragment
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
public void onRequestPermissionsResult(
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults);
}
@@ -226,6 +249,15 @@ public class ContactSelectionListFragment extends Fragment
return selected;
}
public @NonNull List<Integer> getDeselectedContacts() {
List<Integer> deselected = new LinkedList<>();
if (deselectedContacts != null) {
deselected.addAll(deselectedContacts);
}
return deselected;
}
private boolean isMulti() {
return getActivity().getIntent().getBooleanExtra(MULTI_SELECT, false);
}
@@ -235,14 +267,14 @@ public class ContactSelectionListFragment extends Fragment
}
private void initializeCursor() {
ContactSelectionListAdapter adapter = new ContactSelectionListAdapter(getActivity(),
GlideApp.with(this),
new ListClickListener(),
isMulti(),
true);
ContactSelectionListAdapter adapter =
new ContactSelectionListAdapter(
getActivity(), GlideApp.with(this), new ListClickListener(), isMulti(), true);
selectedContacts = adapter.getSelectedContacts();
ArrayList<Integer> preselectedContacts = getActivity().getIntent().getIntegerArrayListExtra(PRESELECTED_CONTACTS);
if(preselectedContacts!=null) {
deselectedContacts = new HashSet<>();
ArrayList<Integer> preselectedContacts =
getActivity().getIntent().getIntegerArrayListExtra(PRESELECTED_CONTACTS);
if (preselectedContacts != null) {
selectedContacts.addAll(preselectedContacts);
}
recyclerView.setAdapter(adapter);
@@ -257,16 +289,34 @@ public class ContactSelectionListFragment extends Fragment
public Loader<DcContactsLoader.Ret> onCreateLoader(int id, Bundle args) {
final boolean allowCreation = getActivity().getIntent().getBooleanExtra(ALLOW_CREATION, true);
final boolean addCreateContactLink = allowCreation && isUnencrypted();
final boolean addCreateGroupLinks = allowCreation && !isRelayingMessageContent(getActivity()) && !isMulti();
final boolean addCreateGroupLinks =
allowCreation && !isRelayingMessageContent(getActivity()) && !isMulti();
final boolean addScanQRLink = allowCreation && !isMulti();
final int listflags = DcContext.DC_GCL_ADD_SELF | (isUnencrypted()? DcContext.DC_GCL_ADDRESS : 0);
return new DcContactsLoader(getActivity(), listflags, cursorFilter, addCreateGroupLinks, addCreateContactLink, addScanQRLink, false);
final int listflags =
DcContext.DC_GCL_ADD_SELF | (isUnencrypted() ? DcContext.DC_GCL_ADDRESS : 0);
return new DcContactsLoader(
getActivity(),
listflags,
cursorFilter,
addCreateGroupLinks,
addCreateContactLink,
addScanQRLink,
false);
}
@Override
public void onLoadFinished(Loader<DcContactsLoader.Ret> loader, DcContactsLoader.Ret data) {
((ContactSelectionListAdapter) recyclerView.getAdapter()).changeData(data);
ContactSelectionListAdapter adapter = (ContactSelectionListAdapter) recyclerView.getAdapter();
adapter.changeData(data);
if (emptyView != null) {
if (adapter.getItemCount() > 0 || TextUtils.isEmpty(cursorFilter)) {
emptyView.setVisibility(View.GONE);
} else {
emptyView.setText(getString(R.string.search_no_result_for_x, cursorFilter));
emptyView.setVisibility(View.VISIBLE);
}
}
}
@Override
@@ -276,18 +326,14 @@ public class ContactSelectionListFragment extends Fragment
private class ListClickListener implements ContactSelectionListAdapter.ItemClickListener {
@Override
public void onItemClick(ContactSelectionListItem contact, boolean handleActionMode)
{
public void onItemClick(ContactSelectionListItem contact, boolean handleActionMode) {
if (handleActionMode) {
if (actionMode != null) {
Menu menu = actionMode.getMenu();
setCorrectMenuVisibility(menu);
updateActionModeTitle();
finishActionModeIfSelectionIsEmpty();
updateActionModeState(actionMode);
}
return;
}
int contactId = contact.getSpecialId();
int contactId = contact.getSpecialId();
if (!isMulti() || !selectedContacts.contains(contactId)) {
if (contactId == DcContact.DC_CONTACT_ID_NEW_CLASSIC_CONTACT) {
Intent intent = new Intent(getContext(), NewContactActivity.class);
@@ -295,7 +341,7 @@ public class ContactSelectionListFragment extends Fragment
intent.putExtra(NewContactActivity.ADDR_EXTRA, cursorFilter);
}
if (isMulti()) {
startActivityForResult(intent, CONTACT_ADDR_RESULT_CODE);
newContactLauncher.launch(intent);
} else {
requireContext().startActivity(intent);
}
@@ -303,12 +349,14 @@ public class ContactSelectionListFragment extends Fragment
}
selectedContacts.add(contactId);
deselectedContacts.remove(contactId);
contact.setChecked(true);
if (onContactSelectedListener != null) {
onContactSelectedListener.onContactSelected(contactId);
}
} else {
selectedContacts.remove(contactId);
deselectedContacts.add(contactId);
contact.setChecked(false);
if (onContactSelectedListener != null) {
onContactSelectedListener.onContactDeselected(contactId);
@@ -319,43 +367,26 @@ public class ContactSelectionListFragment extends Fragment
@Override
public void onItemLongClick(ContactSelectionListItem view) {
if (actionMode == null) {
actionMode = ((AppCompatActivity)getActivity()).startSupportActionMode(actionModeCallback);
actionMode = ((AppCompatActivity) getActivity()).startSupportActionMode(actionModeCallback);
} else {
finishActionModeIfSelectionIsEmpty();
updateActionModeState(actionMode);
}
}
}
private void finishActionModeIfSelectionIsEmpty() {
if (getContactSelectionListAdapter().getActionModeSelection().size() == 0) {
actionMode.finish();
}
}
public void setOnContactSelectedListener(OnContactSelectedListener onContactSelectedListener) {
public void setOnContactSelectedListener(OnContactSelectedListener onContactSelectedListener) {
this.onContactSelectedListener = onContactSelectedListener;
}
public interface OnContactSelectedListener {
void onContactSelected(int contactId);
void onContactDeselected(int contactId);
}
@Override
public void handleEvent(@NonNull DcEvent event) {
if (event.getId()==DcContext.DC_EVENT_CONTACTS_CHANGED) {
getLoaderManager().restartLoader(0, null, ContactSelectionListFragment.this);
}
}
@Override
public void onActivityResult(int reqCode, int resultCode, final Intent data) {
super.onActivityResult(reqCode, resultCode, data);
if (resultCode == Activity.RESULT_OK && reqCode == CONTACT_ADDR_RESULT_CODE) {
int contactId = data.getIntExtra(NewContactActivity.CONTACT_ID_EXTRA, 0);
if (contactId != 0) {
selectedContacts.add(contactId);
}
if (event.getId() == DcContext.DC_EVENT_CONTACTS_CHANGED) {
getLoaderManager().restartLoader(0, null, ContactSelectionListFragment.this);
}
}
@@ -25,6 +25,7 @@ import android.Manifest;
import android.annotation.SuppressLint;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
@@ -57,6 +58,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
@@ -64,7 +66,12 @@ import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.view.WindowCompat;
import androidx.lifecycle.ViewModelProvider;
import androidx.media3.session.MediaController;
import androidx.media3.session.SessionCommand;
import androidx.media3.session.SessionToken;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContact;
@@ -75,7 +82,7 @@ import com.b44t.messenger.DcMsg;
import org.thoughtcrime.securesms.attachments.Attachment;
import org.thoughtcrime.securesms.attachments.UriAttachment;
import org.thoughtcrime.securesms.audio.AudioRecorder;
import org.thoughtcrime.securesms.audio.AudioSlidePlayer;
import org.thoughtcrime.securesms.calls.CallUtil;
import org.thoughtcrime.securesms.components.AnimatingToggle;
import org.thoughtcrime.securesms.components.AttachmentTypeSelector;
import org.thoughtcrime.securesms.components.ComposeText;
@@ -85,6 +92,8 @@ import org.thoughtcrime.securesms.components.InputPanel;
import org.thoughtcrime.securesms.components.KeyboardAwareLinearLayout.OnKeyboardShownListener;
import org.thoughtcrime.securesms.components.ScaleStableImageView;
import org.thoughtcrime.securesms.components.SendButton;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.components.audioplay.AudioView;
import org.thoughtcrime.securesms.components.emoji.MediaKeyboard;
import org.thoughtcrime.securesms.connect.AccountManager;
import org.thoughtcrime.securesms.connect.DcEventCenter;
@@ -103,19 +112,19 @@ import org.thoughtcrime.securesms.permissions.Permissions;
import org.thoughtcrime.securesms.providers.PersistentBlobProvider;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.scribbles.ScribbleActivity;
import org.thoughtcrime.securesms.service.AudioPlaybackService;
import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.MediaUtil;
import org.thoughtcrime.securesms.util.Prefs;
import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.SendRelayedMessageUtil;
import org.thoughtcrime.securesms.util.ServiceUtil;
import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener;
import org.thoughtcrime.securesms.util.guava.Optional;
import org.thoughtcrime.securesms.util.views.ProgressDialog;
import org.thoughtcrime.securesms.video.recode.VideoRecoder;
import org.thoughtcrime.securesms.calls.CallUtil;
import java.io.File;
import java.util.ArrayList;
@@ -137,14 +146,13 @@ import chat.delta.util.SettableFuture;
*/
@SuppressLint("StaticFieldLeak")
public class ConversationActivity extends PassphraseRequiredActionBarActivity
implements ConversationFragment.ConversationFragmentListener,
AttachmentManager.AttachmentListener,
SearchView.OnQueryTextListener,
DcEventCenter.DcEventDelegate,
OnKeyboardShownListener,
InputPanel.Listener,
InputPanel.MediaListener
{
implements ConversationFragment.ConversationFragmentListener,
AttachmentManager.AttachmentListener,
SearchView.OnQueryTextListener,
DcEventCenter.DcEventDelegate,
OnKeyboardShownListener,
InputPanel.Listener,
InputPanel.MediaListener, AudioView.OnActionListener {
private static final String TAG = ConversationActivity.class.getSimpleName();
public static final String ACCOUNT_ID_EXTRA = "account_id";
@@ -184,10 +192,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private MediaKeyboard emojiPicker;
protected HidingLinearLayout quickAttachmentToggle;
private InputPanel inputPanel;
private @Nullable MediaController mediaController;
private com.google.common.util.concurrent.ListenableFuture<MediaController> mediaControllerFuture;
private AudioPlaybackViewModel playbackViewModel;
private ApplicationContext context;
private Recipient recipient;
private DcContext dcContext;
private Rpc rpc;
private DcChat dcChat = new DcChat(0, 0);
private int chatId;
@@ -196,11 +206,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private boolean isSecurityInitialized = false;
private boolean successfulForwardingAttempt = false;
private boolean isEditing = false;
private boolean switchedProfile = false;
@Override
protected void onCreate(Bundle state, boolean ready) {
this.context = ApplicationContext.getInstance(getApplicationContext());
this.dcContext = DcHelper.getContext(context);
this.rpc = DcHelper.getRpc(context);
supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY);
@@ -217,6 +227,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
initializeActionBar();
initializeViews();
initializeResources();
playbackViewModel = new ViewModelProvider(this).get(AudioPlaybackViewModel.class);
initializeMediaController();
initializeSecurity(false, isDefaultSms).addListener(new AssertedSuccessListener<Boolean>() {
@Override
public void onSuccess(Boolean result) {
@@ -237,17 +251,64 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
});
getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
if (container.isInputOpen()) {
container.hideCurrentInput(composeText);
} else {
handleReturnToConversationList();
}
}
});
setDcEventListener();
handleRelaying();
}
private void setDcEventListener() {
DcEventCenter eventCenter = DcHelper.getEventCenter(this);
eventCenter.addObserver(DcContext.DC_EVENT_CHAT_MODIFIED, this);
eventCenter.addObserver(DcContext.DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED, this);
eventCenter.addObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
// first cleanup in case it was already registered for other chat
eventCenter.removeObservers(this);
eventCenter.addMultiAccountObserver(DcContext.DC_EVENT_CHAT_MODIFIED, this);
eventCenter.addMultiAccountObserver(DcContext.DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED, this);
eventCenter.addMultiAccountObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
if (!isMultiUser()) {
eventCenter.addObserver(DcContext.DC_EVENT_INCOMING_MSG, this);
eventCenter.addObserver(DcContext.DC_EVENT_MSG_READ, this);
eventCenter.addMultiAccountObserver(DcContext.DC_EVENT_INCOMING_MSG, this);
eventCenter.addMultiAccountObserver(DcContext.DC_EVENT_MSG_READ, this);
}
}
private void initializeMediaController() {
SessionToken sessionToken = new SessionToken(this,
new ComponentName(this, AudioPlaybackService.class));
mediaControllerFuture = new MediaController.Builder(this, sessionToken)
.buildAsync();
mediaControllerFuture.addListener(() -> {
try {
mediaController = mediaControllerFuture.get();
playbackViewModel.setMediaController(mediaController);
} catch (Exception e) {
Log.e(TAG, "Error connecting to audio playback service", e);
}
}, ContextCompat.getMainExecutor(this));
}
private void addActivityContext(Bundle extras, String activityClassName) {
if (mediaController == null) return;
Bundle commandArgs = new Bundle();
commandArgs.putString("activity_class", activityClassName);
if (extras != null) {
commandArgs.putAll(extras);
}
handleRelaying();
SessionCommand updateContextCommand =
new SessionCommand("UPDATE_ACTIVITY_CONTEXT", Bundle.EMPTY);
mediaController.sendCustomCommand(updateContextCommand, commandArgs);
}
@Override
@@ -273,6 +334,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
});
setDcEventListener(); // reset event listener
handleRelaying();
if (fragment != null) {
@@ -299,7 +361,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
titleView.setTitle(glideRequests, dcChat);
DcHelper.getNotificationCenter(this).updateVisibleChat(dcContext.getAccountId(), chatId);
try {
int accId = rpc.getSelectedAccountId();
DcHelper.getNotificationCenter(this).updateVisibleChat(accId, chatId);
} catch (RpcException e) {
Log.e(TAG, "rpc.getSelectedAccountId() failed", e);
}
attachmentManager.onResume();
}
@@ -313,7 +381,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
DcHelper.getNotificationCenter(this).clearVisibleChat();
if (isFinishing()) overridePendingTransition(R.anim.fade_scale_in, R.anim.slide_to_right);
inputPanel.onPause();
AudioSlidePlayer.stopAll();
}
@Override
@@ -333,6 +400,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
protected void onDestroy() {
DcHelper.getEventCenter(this).removeObservers(this);
if (mediaController != null) {
MediaController.releaseFuture(mediaControllerFuture);
mediaController = null;
playbackViewModel.setMediaController(null);
}
super.onDestroy();
}
@@ -389,7 +461,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
break;
case GROUP_EDIT:
dcChat = dcContext.getChat(chatId);
dcChat = DcHelper.getContext(context).getChat(chatId);
titleView.setTitle(glideRequests, dcChat);
break;
@@ -459,15 +531,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
menu.findItem(R.id.menu_ephemeral_messages).setVisible(false);
}
if (isMultiUser()) {
if (dcChat.isInBroadcast() && !dcChat.isContactRequest()) {
menu.findItem(R.id.menu_leave).setTitle(R.string.menu_leave_channel).setVisible(true);
} else if (dcChat.isEncrypted()
&& dcChat.canSend()
&& !dcChat.isOutBroadcast()
&& !dcChat.isMailingList()) {
menu.findItem(R.id.menu_leave).setVisible(true);
if (dcChat.shallLeaveBeforeDelete(DcHelper.getContext(context))) {
if (dcChat.isInBroadcast()) {
menu.findItem(R.id.menu_leave).setTitle(R.string.menu_leave_channel);
}
menu.findItem(R.id.menu_leave).setVisible(true);
menu.findItem(R.id.menu_delete_chat).setVisible(false);
}
if (isArchived()) {
@@ -545,8 +614,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
} else if (itemId == R.id.menu_show_map) {
WebxdcActivity.openMaps(this, chatId);
return true;
} else if (itemId == R.id.menu_start_call) {
CallUtil.startCall(this, chatId);
} else if (itemId == R.id.menu_start_audio_call) {
CallUtil.startCall(this, chatId, false);
return true;
} else if (itemId == R.id.menu_start_video_call) {
CallUtil.startCall(this, chatId, true);
return true;
} else if (itemId == R.id.menu_all_media) {
handleAllMedia();
@@ -568,15 +640,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
return false;
}
@Override
public void onBackPressed() {
if (container.isInputOpen()){
container.hideCurrentInput(composeText);
} else {
handleReturnToConversationList();
}
}
@Override
public void onKeyboardShown() {
inputPanel.onKeyboardShown();
@@ -599,6 +662,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
//////// Event Handlers
private void handleEphemeralMessages() {
DcContext dcContext = DcHelper.getContext(context);
int preselected = dcContext.getChatEphemeralTimer(chatId);
EphemeralMessagesDialog.show(this, preselected, duration -> {
dcContext.setChatEphemeralTimer(chatId, (int) duration);
@@ -610,6 +674,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void handleReturnToConversationList(@Nullable Bundle extras) {
if (switchedProfile) { // force refreshing of chatlist
if (extras == null) extras = new Bundle();
extras.putInt(ConversationListFragment.RELOAD_LIST, 1);
}
playbackViewModel.stopNonMessageAudioPlayback();
boolean archived = getIntent().getBooleanExtra(FROM_ARCHIVED_CHATS_EXTRA, false);
Intent intent = new Intent(this, (archived ? ConversationListArchiveActivity.class : ConversationListActivity.class));
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
@@ -619,6 +690,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void handleMuteNotifications() {
DcContext dcContext = DcHelper.getContext(context);
if(!dcChat.isMuted()) {
MuteDialog.show(this, duration -> {
dcContext.setChatMuteDuration(chatId, duration);
@@ -654,15 +726,23 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
AlertDialog dialog = new AlertDialog.Builder(this)
.setMessage(getString(R.string.ask_leave_group))
.setPositiveButton(leaveLabel, (d, which) -> {
dcContext.removeContactFromChat(chatId, DcContact.DC_CONTACT_ID_SELF);
DcHelper.getContext(context).removeContactFromChat(chatId, DcContact.DC_CONTACT_ID_SELF);
Toast.makeText(this, getString(R.string.done), Toast.LENGTH_SHORT).show();
})
.setNegativeButton(R.string.cancel, null)
.setNegativeButton(R.string.menu_leave_and_delete, (d, which) -> {
DcHelper.getContext(context).removeContactFromChat(chatId, DcContact.DC_CONTACT_ID_SELF);
DcHelper.getContext(context).deleteChat(chatId);
DirectShareUtil.clearShortcut(this, chatId);
finish();
})
.setNeutralButton(R.string.cancel, null)
.show();
Util.redPositiveButton(dialog);
Util.redButton(dialog, AlertDialog.BUTTON_NEGATIVE);
}
private void handleArchiveChat() {
DcContext dcContext = DcHelper.getContext(context);
int newVisibility = isArchived() ?
DcChat.DC_CHAT_VISIBILITY_NORMAL : DcChat.DC_CHAT_VISIBILITY_ARCHIVED;
dcContext.setChatVisibility(chatId, newVisibility);
@@ -677,8 +757,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void handleDeleteChat() {
AlertDialog dialog = new AlertDialog.Builder(this)
.setMessage(getResources().getString(R.string.ask_delete_named_chat, dcChat.getName()))
.setPositiveButton(R.string.delete, (d, which) -> {
dcContext.deleteChat(chatId);
.setPositiveButton(R.string.delete_for_me, (d, which) -> {
DcHelper.getContext(context).deleteChat(chatId);
DirectShareUtil.clearShortcut(this, chatId);
finish();
})
@@ -708,6 +788,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void handleForwarding() {
DcContext dcContext = DcHelper.getContext(context);
DcChat dcChat = dcContext.getChat(chatId);
if (dcChat.isSelfTalk()) {
SendRelayedMessageUtil.immediatelyRelay(this, chatId);
@@ -756,7 +837,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
SendRelayedMessageUtil.immediatelyRelay(this, chatId);
} else {
Uri uri = uriList.isEmpty()? null : uriList.get(0);
dcContext.setDraft(chatId, SendRelayedMessageUtil.createMessage(this, uri, ShareUtil.getSharedType(this), null, null, getSharedText(this)));
DcHelper.getContext(context).setDraft(chatId, SendRelayedMessageUtil.createMessage(this, uri, ShareUtil.getSharedType(this), null, null, getSharedText(this)));
}
initializeDraft();
}
@@ -771,7 +852,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private ListenableFuture<Boolean> initializeDraft() {
isEditing = false;
final SettableFuture<Boolean> future = new SettableFuture<>();
DcMsg draft = dcContext.getDraft(chatId);
DcMsg draft = DcHelper.getContext(context).getDraft(chatId);
final String sharedText = ShareUtil.getSharedText(this);
if (!draft.isOk()) {
@@ -932,7 +1013,15 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void initializeBackground() {
String backgroundImagePath = Prefs.getBackgroundImagePath(this, dcContext.getAccountId());
int accId;
try {
accId = rpc.getSelectedAccountId();
} catch (RpcException e) {
Log.e(TAG, "rpc.getSelectedAccountId() failed", e);
return;
}
String backgroundImagePath = Prefs.getBackgroundImagePath(this, accId);
Drawable background;
if(!backgroundImagePath.isEmpty()) {
background = Drawable.createFromPath(backgroundImagePath);
@@ -958,33 +1047,44 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
private void initializeResources() {
int accountId = getIntent().getIntExtra(ACCOUNT_ID_EXTRA, dcContext.getAccountId());
if (accountId != dcContext.getAccountId()) {
int selectedAccId = DcHelper.getContext(context).getAccountId();
int accountId = getIntent().getIntExtra(ACCOUNT_ID_EXTRA, selectedAccId);
if (accountId != selectedAccId) {
switchedProfile = true;
AccountManager.getInstance().switchAccount(context, accountId);
fragment.dcContext = dcContext = context.getDcContext();
initializeBackground();
}
chatId = getIntent().getIntExtra(CHAT_ID_EXTRA, -1);
if(chatId == DcChat.DC_CHAT_NO_CHAT)
throw new IllegalStateException("can't display a conversation for no chat.");
dcChat = dcContext.getChat(chatId);
dcChat = DcHelper.getContext(context).getChat(chatId);
recipient = new Recipient(this, dcChat);
glideRequests = GlideApp.with(this);
setComposePanelVisibility();
setComposePanelVisibility(true);
initializeContactRequest();
}
private void setComposePanelVisibility() {
private void setComposePanelVisibility(boolean isInitialization) {
if (dcChat.canSend()) {
composePanel.setVisibility(View.VISIBLE);
attachmentManager.setHidden(false);
inputPanel.setSubjectVisible(!dcChat.isEncrypted());
// FIXME: disabled for now to avoid problems with chat scrolling and keyboard covering input bar
// ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, true);
// fragment.handleRemoveBottomInsets();
} else {
composePanel.setVisibility(View.GONE);
attachmentManager.setHidden(true);
hideSoftKeyboard();
inputPanel.setSubjectVisible(false);
// FIXME: disabled for now to avoid problems with chat scrolling and keyboard covering input bar
/*
if (isInitialization) {
ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, false);
fragment.handleAddBottomInsets();
}
*/
}
}
@@ -1021,11 +1121,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
return new SettableFuture<>(false);
}
return attachmentManager.setMedia(glideRequests, uri, null, mediaType, 0, 0, chatId);
return attachmentManager.setMedia(glideRequests, uri, null, mediaType, 0, 0, chatId, playbackViewModel);
}
private ListenableFuture<Boolean> setMedia(DcMsg msg, @NonNull MediaType mediaType) {
return attachmentManager.setMedia(glideRequests, Uri.fromFile(new File(msg.getFile())), msg, mediaType, 0, 0, chatId);
return attachmentManager.setMedia(glideRequests, Uri.fromFile(new File(msg.getFile())), msg, mediaType, 0, 0, chatId, playbackViewModel);
}
private void addAttachmentContactInfo(int contactId) {
@@ -1034,11 +1134,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
try {
byte[] vcard = rpc.makeVcard(dcContext.getAccountId(), Collections.singletonList(contactId)).getBytes();
byte[] vcard = rpc.makeVcard(rpc.getSelectedAccountId(), Collections.singletonList(contactId)).getBytes();
String mimeType = "application/octet-stream";
setMedia(PersistentBlobProvider.getInstance().create(this, vcard, mimeType, "vcard.vcf"), MediaType.DOCUMENT);
} catch (RpcException e) {
Log.e(TAG, "makeVcard() failed", e);
Log.e(TAG, "RPC failed", e);
}
}
@@ -1077,6 +1177,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
inputPanel.clearSubject();
}
// Stop draft audio playback regardless, since it is unlikely
// we will need background playback for drafts
playbackViewModel.stopNonMessageAudioPlayback();
DcContext dcContext = DcHelper.getContext(context);
final int currentChatId = dcChat.getId();
Util.runOnAnyBackgroundThread(() -> {
DcMsg msg = null;
int recompress = 0;
@@ -1086,9 +1192,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
if (action == ACTION_SEND_OUT) {
dcContext.sendEditRequest(msgId, body);
} else {
dcContext.setDraft(chatId, null);
dcContext.setDraft(currentChatId, null);
}
future.set(chatId);
future.set(currentChatId);
return;
}
@@ -1099,7 +1205,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
try {
if (slideDeck.getWebxdctDraftId() != 0) {
msg = dcContext.getDraft(chatId);
msg = dcContext.getDraft(currentChatId);
} else {
List<Attachment> attachments = slideDeck.asAttachments();
for (Attachment attachment : attachments) {
@@ -1148,7 +1254,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
// for WEBXDC, drafts are just sent out as is.
// for preparations and other cases, cleanup draft soon.
if (msg == null || msg.getType() != DcMsg.DC_MSG_WEBXDC) {
dcContext.setDraft(dcChat.getId(), null);
dcContext.setDraft(currentChatId, null);
}
if(msg!=null) {
@@ -1164,7 +1270,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
false
);
});
doSend = VideoRecoder.prepareVideo(ConversationActivity.this, dcChat.getId(), msg);
doSend = VideoRecoder.prepareVideo(ConversationActivity.this, currentChatId, msg);
Util.runOnMain(() -> {
try {
if (progressDialog != null) progressDialog.dismiss();
@@ -1175,43 +1281,34 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
if (doSend) {
if (dcContext.sendMsg(dcChat.getId(), msg) == 0) {
if (dcContext.sendMsg(currentChatId, msg) == 0) {
String lastError = dcContext.getLastError();
if (!"".equals(lastError)) {
Util.runOnMain(() -> Toast.makeText(ConversationActivity.this, lastError, Toast.LENGTH_LONG).show());
}
future.set(chatId);
future.set(currentChatId);
return;
}
}
Util.runOnMain(() -> sendComplete(dcChat.getId()));
Util.runOnMain(() -> sendComplete());
}
} else {
dcContext.setDraft(dcChat.getId(), msg);
dcContext.setDraft(currentChatId, msg);
}
future.set(chatId);
future.set(currentChatId);
});
return future;
}
protected void sendComplete(int chatId) {
boolean refreshFragment = (chatId != this.chatId);
this.chatId = chatId;
protected void sendComplete() {
if (fragment == null || !fragment.isVisible() || isFinishing()) {
return;
}
fragment.setLastSeen(-1);
if (refreshFragment) {
fragment.reload(recipient, chatId);
DcHelper.getNotificationCenter(this).updateVisibleChat(dcContext.getAccountId(), chatId);
}
fragment.scrollToBottom();
attachmentManager.cleanup();
}
@@ -1350,6 +1447,18 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
isEditing = false;
}
@Override
public void onStickerPicked(Uri stickerUri) {
if (isEditing) return;
sendSticker(stickerUri, "image/webp");
}
public void refreshStickerPicker() {
if (emojiPicker != null) {
emojiPicker.refreshStickerPicker();
}
}
// media selected by the system keyboard
@Override
public void onMediaSelected(@NonNull Uri uri, String contentType) {
@@ -1371,6 +1480,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
Optional<QuoteModel> quote = inputPanel.getQuote();
inputPanel.clearQuote();
DcContext dcContext = DcHelper.getContext(context);
DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_STICKER);
if (quote.isPresent()) {
msg.setQuote(quote.get().getQuotedMsg());
@@ -1382,6 +1492,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
// Listeners
@Override
public void onPlayPauseButtonClicked(View view) {
addActivityContext(
this.getIntent().getExtras(),
this.getClass().getName()
);
}
private class AttachmentTypeListener implements AttachmentTypeSelector.AttachmentClickedListener {
@Override
public void onClick(int type) {
@@ -1492,7 +1610,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
if (isEditing) composeText.setText("");
isEditing = false;
// If you modify these lines you may also want to modify ConversationItem.setQuote():
Recipient author = new Recipient(this, dcContext.getContact(msg.getFromId()));
Recipient author = new Recipient(this, DcHelper.getContext(context).getContact(msg.getFromId()));
SlideDeck slideDeck = new SlideDeck();
if (msg.hasFile()) {
@@ -1515,7 +1633,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void handleEditMessage(DcMsg msg) {
isEditing = true;
Recipient author = new Recipient(this, dcContext.getContact(msg.getFromId()));
Recipient author = new Recipient(this, DcHelper.getContext(context).getContact(msg.getFromId()));
SlideDeck slideDeck = new SlideDeck();
String text = msg.getSummarytext(500);
@@ -1540,6 +1658,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void handleEvent(@NonNull DcEvent event) {
DcContext dcContext = DcHelper.getContext(context);
if (event.getAccountId() != dcContext.getAccountId()) return;
int eventId = event.getId();
if ((eventId == DcContext.DC_EVENT_CHAT_MODIFIED && event.getData1Int() == chatId)
|| (eventId == DcContext.DC_EVENT_CHAT_EPHEMERAL_TIMER_MODIFIED && event.getData1Int() == chatId)
@@ -1547,7 +1668,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
dcChat = dcContext.getChat(chatId);
titleView.setTitle(glideRequests, dcChat);
initializeSecurity(isSecureText, isDefaultSms);
setComposePanelVisibility();
setComposePanelVisibility(false);
initializeContactRequest();
} else if ((eventId == DcContext.DC_EVENT_INCOMING_MSG
|| eventId == DcContext.DC_EVENT_MSG_READ)
@@ -1626,7 +1747,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
String normQuery = query.trim();
searchResult = dcContext.searchMsgs(chatId, normQuery);
searchResult = DcHelper.getContext(context).searchMsgs(chatId, normQuery);
if(searchResult.length>0) {
searchResultPosition = searchResult.length - 1;
@@ -1657,7 +1778,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
messageRequestBottomView.setVisibility(View.VISIBLE);
messageRequestBottomView.setAcceptOnClickListener(v -> {
dcContext.acceptChat(chatId);
DcHelper.getContext(context).acceptChat(chatId);
messageRequestBottomView.setVisibility(View.GONE);
composePanel.setVisibility(View.VISIBLE);
});
@@ -1675,7 +1796,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
// avoid showing compose panel on receiving DC_EVENT_CONTACTS_CHANGED for the chat that is no longer a request after blocking
DcHelper.getEventCenter(this).removeObserver(DcContext.DC_EVENT_CONTACTS_CHANGED, this);
dcContext.blockChat(chatId);
DcHelper.getContext(context).blockChat(chatId);
Bundle extras = new Bundle();
extras.putInt(ConversationListFragment.RELOAD_LIST, 1);
handleReturnToConversationList(extras);
@@ -23,17 +23,23 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcMsg;
import java.lang.ref.SoftReference;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.thoughtcrime.securesms.ConversationAdapter.HeaderViewHolder;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.components.audioplay.AudioView;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.recipients.Recipient;
@@ -43,60 +49,52 @@ import org.thoughtcrime.securesms.util.StickyHeaderDecoration;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.lang.ref.SoftReference;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* A DC adapter for a conversation thread. Ultimately
* used by ConversationActivity to display a conversation
* thread in a ListActivity.
* A DC adapter for a conversation thread. Ultimately used by ConversationActivity to display a
* conversation thread in a ListActivity.
*
* @author Moxie Marlinspike
*
*/
public class ConversationAdapter <V extends View & BindableConversationItem>
// FIXME: this breaks type checks, that is why there are so many casts.
public class ConversationAdapter<V extends View & BindableConversationItem>
extends RecyclerView.Adapter
implements StickyHeaderDecoration.StickyHeaderAdapter<HeaderViewHolder>
{
implements StickyHeaderDecoration.StickyHeaderAdapter<HeaderViewHolder> {
private static final int MAX_CACHE_SIZE = 40;
private final Map<Integer,SoftReference<DcMsg>> recordCache =
Collections.synchronizedMap(new LRUCache<Integer,SoftReference<DcMsg>>(MAX_CACHE_SIZE));
private final Map<Integer, SoftReference<DcMsg>> recordCache =
Collections.synchronizedMap(new LRUCache<Integer, SoftReference<DcMsg>>(MAX_CACHE_SIZE));
private static final int MESSAGE_TYPE_OUTGOING = 0;
private static final int MESSAGE_TYPE_INCOMING = 1;
private static final int MESSAGE_TYPE_INFO = 2;
private static final int MESSAGE_TYPE_AUDIO_OUTGOING = 3;
private static final int MESSAGE_TYPE_AUDIO_INCOMING = 4;
private static final int MESSAGE_TYPE_OUTGOING = 0;
private static final int MESSAGE_TYPE_INCOMING = 1;
private static final int MESSAGE_TYPE_INFO = 2;
private static final int MESSAGE_TYPE_AUDIO_OUTGOING = 3;
private static final int MESSAGE_TYPE_AUDIO_INCOMING = 4;
private static final int MESSAGE_TYPE_THUMBNAIL_OUTGOING = 5;
private static final int MESSAGE_TYPE_THUMBNAIL_INCOMING = 6;
private static final int MESSAGE_TYPE_DOCUMENT_OUTGOING = 7;
private static final int MESSAGE_TYPE_DOCUMENT_INCOMING = 8;
private static final int MESSAGE_TYPE_STICKER_INCOMING = 9;
private static final int MESSAGE_TYPE_STICKER_OUTGOING = 10;
private static final int MESSAGE_TYPE_DOCUMENT_OUTGOING = 7;
private static final int MESSAGE_TYPE_DOCUMENT_INCOMING = 8;
private static final int MESSAGE_TYPE_STICKER_INCOMING = 9;
private static final int MESSAGE_TYPE_STICKER_OUTGOING = 10;
private final Set<DcMsg> batchSelected = Collections.synchronizedSet(new HashSet<DcMsg>());
private final @Nullable ItemClickListener clickListener;
private final @NonNull GlideRequests glideRequests;
private final @NonNull Recipient recipient;
private final @NonNull LayoutInflater inflater;
private final @NonNull Context context;
private final @NonNull Calendar calendar;
private final @NonNull GlideRequests glideRequests;
private final @NonNull Recipient recipient;
private final @NonNull LayoutInflater inflater;
private final @NonNull Context context;
private final @NonNull Calendar calendar;
private final DcContext dcContext;
private @NonNull DcChat dcChat;
private @NonNull int[] dcMsgList = new int[0];
private int positionToPulseHighlight = -1;
private int positionCurrentlyPulseHighlighting = -1;
private long pulseHighlightingSince = -1;
private int lastSeenPosition = -1;
private long lastSeen = -1;
private final DcContext dcContext;
private @NonNull DcChat dcChat;
private @NonNull int[] dcMsgList = new int[0];
private int positionToPulseHighlight = -1;
private int positionCurrentlyPulseHighlighting = -1;
private long pulseHighlightingSince = -1;
private int lastSeenPosition = -1;
private long lastSeen = -1;
private AudioPlaybackViewModel playbackViewModel;
private AudioView.OnActionListener audioPlayPauseListener;
protected static class ViewHolder extends RecyclerView.ViewHolder {
public <V extends View & BindableConversationItem> ViewHolder(final @NonNull V itemView) {
@@ -105,7 +103,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
@SuppressWarnings("unchecked")
public <V extends View & BindableConversationItem> V getView() {
return (V)itemView;
return (V) itemView;
}
public BindableConversationItem getItem() {
@@ -113,16 +111,14 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
}
public boolean isActive() {
return dcMsgList.length > 0;
}
public @NonNull DcChat getChat(){
public @NonNull DcChat getChat() {
return dcChat;
}
public void setLastSeen(long timestamp) {
lastSeen = timestamp;
}
@@ -146,14 +142,14 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
@Override
public long getItemId(int position) {
if (position<0 || position>=dcMsgList.length) {
if (position < 0 || position >= dcMsgList.length) {
return 0;
}
return dcMsgList[dcMsgList.length-1-position];
return dcMsgList[dcMsgList.length - 1 - position];
}
public @NonNull DcMsg getMsg(int position) {
if(position<0 || position>=dcMsgList.length) {
if (position < 0 || position >= dcMsgList.length) {
return new DcMsg(0);
}
@@ -165,17 +161,23 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
}
final DcMsg fromDb = dcContext.getMsg((int)getItemId(position));
final DcMsg fromDb = dcContext.getMsg((int) getItemId(position));
recordCache.put(position, new SoftReference<>(fromDb));
return fromDb;
}
/**
* Returns the position of the message with msgId in the chat list, counted from the top
*/
public void setPlaybackViewModel(AudioPlaybackViewModel playbackViewModel) {
this.playbackViewModel = playbackViewModel;
}
public void setAudioPlayPauseListener(AudioView.OnActionListener audioPlayPauseListener) {
this.audioPlayPauseListener = audioPlayPauseListener;
}
/** Returns the position of the message with msgId in the chat list, counted from the top */
public int msgIdToPosition(int msgId) {
for(int i=0; i<dcMsgList.length; i++ ) {
if(dcMsgList[i]==msgId) {
for (int i = 0; i < dcMsgList.length; i++) {
if (dcMsgList[i] == msgId) {
return dcMsgList.length - 1 - i;
}
}
@@ -200,17 +202,18 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
}
interface ItemClickListener extends BindableConversationItem.EventListener {
void onItemClick(DcMsg item);
void onItemLongClick(DcMsg item, View view);
}
public ConversationAdapter(@NonNull Context context,
@NonNull DcChat dcChat,
@NonNull GlideRequests glideRequests,
@Nullable ItemClickListener clickListener,
@NonNull Recipient recipient) {
public ConversationAdapter(
@NonNull Context context,
@NonNull DcChat dcChat,
@NonNull GlideRequests glideRequests,
@Nullable ItemClickListener clickListener,
@NonNull Recipient recipient) {
this.dcChat = dcChat;
this.glideRequests = glideRequests;
this.clickListener = clickListener;
@@ -218,14 +221,14 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
this.context = context;
this.inflater = LayoutInflater.from(context);
this.calendar = Calendar.getInstance();
this.dcContext = DcHelper.getContext(context);
this.dcContext = DcHelper.getContext(context);
setHasStableIds(true);
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
ConversationAdapter.ViewHolder holder = (ConversationAdapter.ViewHolder)viewHolder;
ConversationAdapter.ViewHolder holder = (ConversationAdapter.ViewHolder) viewHolder;
long now = System.currentTimeMillis();
if (position == positionToPulseHighlight) {
@@ -235,14 +238,25 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
long elapsed = now - pulseHighlightingSince;
boolean pulseHighlight = (positionCurrentlyPulseHighlighting == position && elapsed < PULSE_HIGHLIGHT_MILLIS);
boolean pulseHighlight =
(positionCurrentlyPulseHighlighting == position && elapsed < PULSE_HIGHLIGHT_MILLIS);
holder.getItem().bind(getMsg(position), dcChat, glideRequests, batchSelected, recipient, pulseHighlight);
holder
.getItem()
.bind(
getMsg(position),
dcChat,
glideRequests,
batchSelected,
recipient,
pulseHighlight,
playbackViewModel,
audioPlayPauseListener);
}
@Override
public void onViewRecycled(@NonNull RecyclerView.ViewHolder viewHolder) {
if (viewHolder.itemView instanceof ConversationItem) {
if (viewHolder.itemView instanceof ConversationItem) {
ConversationSwipeAnimationHelper.update((ConversationItem) viewHolder.itemView, 0, 1);
}
}
@@ -250,17 +264,19 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
final V itemView = ViewUtil.inflate(inflater, parent, getLayoutForViewType(viewType));
itemView.setOnClickListener(view -> {
if (clickListener != null) {
clickListener.onItemClick(itemView.getMessageRecord());
}
});
itemView.setOnLongClickListener(view -> {
if (clickListener != null) {
clickListener.onItemLongClick(itemView.getMessageRecord(), view);
}
return true;
});
itemView.setOnClickListener(
view -> {
if (clickListener != null) {
clickListener.onItemClick(itemView.getMessageRecord());
}
});
itemView.setOnLongClickListener(
view -> {
if (clickListener != null) {
clickListener.onItemLongClick(itemView.getMessageRecord(), view);
}
return true;
});
itemView.setEventListener(clickListener);
return new ViewHolder(itemView);
}
@@ -271,14 +287,19 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
case MESSAGE_TYPE_THUMBNAIL_OUTGOING:
case MESSAGE_TYPE_DOCUMENT_OUTGOING:
case MESSAGE_TYPE_STICKER_OUTGOING:
case MESSAGE_TYPE_OUTGOING: return R.layout.conversation_item_sent;
case MESSAGE_TYPE_OUTGOING:
return R.layout.conversation_item_sent;
case MESSAGE_TYPE_AUDIO_INCOMING:
case MESSAGE_TYPE_THUMBNAIL_INCOMING:
case MESSAGE_TYPE_DOCUMENT_INCOMING:
case MESSAGE_TYPE_STICKER_INCOMING:
case MESSAGE_TYPE_INCOMING: return R.layout.conversation_item_received;
case MESSAGE_TYPE_INFO: return R.layout.conversation_item_update;
default: throw new IllegalArgumentException("unsupported item view type given to ConversationAdapter");
case MESSAGE_TYPE_INCOMING:
return R.layout.conversation_item_received;
case MESSAGE_TYPE_INFO:
return R.layout.conversation_item_update;
default:
throw new IllegalArgumentException(
"unsupported item view type given to ConversationAdapter");
}
}
@@ -288,21 +309,18 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
int type = dcMsg.getType();
if (dcMsg.isInfo()) {
return MESSAGE_TYPE_INFO;
}
else if (type==DcMsg.DC_MSG_AUDIO || type==DcMsg.DC_MSG_VOICE) {
return dcMsg.isOutgoing()? MESSAGE_TYPE_AUDIO_OUTGOING : MESSAGE_TYPE_AUDIO_INCOMING;
}
else if (type==DcMsg.DC_MSG_FILE) {
return dcMsg.isOutgoing()? MESSAGE_TYPE_DOCUMENT_OUTGOING : MESSAGE_TYPE_DOCUMENT_INCOMING;
}
else if (type==DcMsg.DC_MSG_IMAGE || type==DcMsg.DC_MSG_GIF || type==DcMsg.DC_MSG_VIDEO) {
return dcMsg.isOutgoing()? MESSAGE_TYPE_THUMBNAIL_OUTGOING : MESSAGE_TYPE_THUMBNAIL_INCOMING;
}
else if (type == DcMsg.DC_MSG_STICKER) {
return dcMsg.isOutgoing()? MESSAGE_TYPE_STICKER_OUTGOING : MESSAGE_TYPE_STICKER_INCOMING;
}
else {
return dcMsg.isOutgoing()? MESSAGE_TYPE_OUTGOING : MESSAGE_TYPE_INCOMING;
} else if (type == DcMsg.DC_MSG_AUDIO || type == DcMsg.DC_MSG_VOICE) {
return dcMsg.isOutgoing() ? MESSAGE_TYPE_AUDIO_OUTGOING : MESSAGE_TYPE_AUDIO_INCOMING;
} else if (type == DcMsg.DC_MSG_FILE) {
return dcMsg.isOutgoing() ? MESSAGE_TYPE_DOCUMENT_OUTGOING : MESSAGE_TYPE_DOCUMENT_INCOMING;
} else if (type == DcMsg.DC_MSG_IMAGE
|| type == DcMsg.DC_MSG_GIF
|| type == DcMsg.DC_MSG_VIDEO) {
return dcMsg.isOutgoing() ? MESSAGE_TYPE_THUMBNAIL_OUTGOING : MESSAGE_TYPE_THUMBNAIL_INCOMING;
} else if (type == DcMsg.DC_MSG_STICKER) {
return dcMsg.isOutgoing() ? MESSAGE_TYPE_STICKER_OUTGOING : MESSAGE_TYPE_STICKER_INCOMING;
} else {
return dcMsg.isOutgoing() ? MESSAGE_TYPE_OUTGOING : MESSAGE_TYPE_INCOMING;
}
}
@@ -325,16 +343,16 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
public void pulseHighlightItem(int position) {
if (position>=0 && position < getItemCount()) {
if (position >= 0 && position < getItemCount()) {
positionToPulseHighlight = position;
notifyItemChanged(position);
}
}
public long getSortTimestamp(int position) {
if (!isActive()) return 0;
if (!isActive()) return 0;
if (position >= getItemCount()) return 0;
if (position < 0) return 0;
if (position < 0) return 0;
DcMsg msg = getMsg(position);
return msg.getSortTimestamp();
@@ -348,7 +366,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
@Override
public long getHeaderId(int position) {
if (position >= getItemCount()) return -1;
if (position < 0) return -1;
if (position < 0) return -1;
calendar.setTime(new Date(getSortTimestamp(position)));
return Util.hashCode(calendar.get(Calendar.YEAR), calendar.get(Calendar.DAY_OF_YEAR));
@@ -356,18 +374,17 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
@Override
public HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent) {
return new HeaderViewHolder(LayoutInflater.from(getContext()).inflate(R.layout.conversation_item_header, parent, false));
return new HeaderViewHolder(
LayoutInflater.from(getContext())
.inflate(R.layout.conversation_item_header, parent, false));
}
/**
* date header view
*/
/** date header view */
@Override
public void onBindHeaderViewHolder(HeaderViewHolder viewHolder, int position) {
viewHolder.setText(DateUtils.getRelativeDate(getContext(), getSortTimestamp(position)));
}
public void changeData(@Nullable int[] dcMsgList) {
// should be called when there are new messages
this.dcMsgList = dcMsgList == null ? new int[0] : dcMsgList;
@@ -387,12 +404,11 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
private int findLastSeenPosition(long lastSeen) {
if (lastSeen <= 0) return -1;
if (!isActive()) return -1;
if (lastSeen <= 0) return -1;
if (!isActive()) return -1;
int count = getItemCount();
for (int i = 0; i < count; i++) {
DcMsg msg = getMsg(i);
if (msg.isOutgoing() || msg.getTimestamp() <= lastSeen) {
@@ -404,11 +420,16 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
}
public HeaderViewHolder onCreateLastSeenViewHolder(ViewGroup parent) {
return new HeaderViewHolder(LayoutInflater.from(getContext()).inflate(R.layout.conversation_item_last_seen, parent, false));
return new HeaderViewHolder(
LayoutInflater.from(getContext())
.inflate(R.layout.conversation_item_last_seen, parent, false));
}
public void onBindLastSeenViewHolder(HeaderViewHolder viewHolder, int position) {
viewHolder.setText(getContext().getResources().getQuantityString(R.plurals.chat_n_new_messages, (position + 1), (position + 1)));
viewHolder.setText(
getContext()
.getResources()
.getQuantityString(R.plurals.chat_n_new_messages, (position + 1), (position + 1)));
}
static class LastSeenHeader extends StickyHeaderDecoration {
@@ -416,32 +437,45 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
LastSeenHeader(ConversationAdapter adapter) {
super(adapter, false, false);
this.adapter = adapter;
this.adapter = adapter;
}
@Override
protected boolean hasHeader(RecyclerView parent, StickyHeaderAdapter stickyAdapter, int position) {
return adapter.isActive() && position == adapter.getLastSeenPosition();
protected boolean hasHeader(
RecyclerView parent, StickyHeaderAdapter stickyAdapter, int position) {
return adapter.isActive() && position == adapter.getLastSeenPosition();
}
@Override
protected int getHeaderTop(RecyclerView parent, View child, View header, int adapterPos, int layoutPos) {
protected int getHeaderTop(
RecyclerView parent, View child, View header, int adapterPos, int layoutPos) {
return parent.getLayoutManager().getDecoratedTop(child);
}
@Override
protected HeaderViewHolder getHeader(RecyclerView parent, StickyHeaderAdapter stickyAdapter, int position) {
protected HeaderViewHolder getHeader(
RecyclerView parent, StickyHeaderAdapter stickyAdapter, int position) {
HeaderViewHolder viewHolder = adapter.onCreateLastSeenViewHolder(parent);
adapter.onBindLastSeenViewHolder(viewHolder, position);
int widthSpec = View.MeasureSpec.makeMeasureSpec(parent.getWidth(), View.MeasureSpec.EXACTLY);
int heightSpec = View.MeasureSpec.makeMeasureSpec(parent.getHeight(), View.MeasureSpec.UNSPECIFIED);
int widthSpec = View.MeasureSpec.makeMeasureSpec(parent.getWidth(), View.MeasureSpec.EXACTLY);
int heightSpec =
View.MeasureSpec.makeMeasureSpec(parent.getHeight(), View.MeasureSpec.UNSPECIFIED);
int childWidth = ViewGroup.getChildMeasureSpec(widthSpec, parent.getPaddingLeft() + parent.getPaddingRight(), viewHolder.itemView.getLayoutParams().width);
int childHeight = ViewGroup.getChildMeasureSpec(heightSpec, parent.getPaddingTop() + parent.getPaddingBottom(), viewHolder.itemView.getLayoutParams().height);
int childWidth =
ViewGroup.getChildMeasureSpec(
widthSpec,
parent.getPaddingLeft() + parent.getPaddingRight(),
viewHolder.itemView.getLayoutParams().width);
int childHeight =
ViewGroup.getChildMeasureSpec(
heightSpec,
parent.getPaddingTop() + parent.getPaddingBottom(),
viewHolder.itemView.getLayoutParams().height);
viewHolder.itemView.measure(childWidth, childHeight);
viewHolder.itemView.layout(0, 0, viewHolder.itemView.getMeasuredWidth(), viewHolder.itemView.getMeasuredHeight());
viewHolder.itemView.layout(
0, 0, viewHolder.itemView.getMeasuredWidth(), viewHolder.itemView.getMeasuredHeight());
return viewHolder;
}
File diff suppressed because it is too large Load Diff
@@ -41,8 +41,7 @@ import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContact;
import com.b44t.messenger.DcMsg;
import org.thoughtcrime.securesms.audio.AudioSlidePlayer;
import org.thoughtcrime.securesms.components.AudioView;
import org.thoughtcrime.securesms.calls.CallUtil;
import org.thoughtcrime.securesms.components.AvatarImageView;
import org.thoughtcrime.securesms.components.BorderlessImageView;
import org.thoughtcrime.securesms.components.CallItemView;
@@ -52,6 +51,8 @@ import org.thoughtcrime.securesms.components.DocumentView;
import org.thoughtcrime.securesms.components.QuoteView;
import org.thoughtcrime.securesms.components.VcardView;
import org.thoughtcrime.securesms.components.WebxdcView;
import org.thoughtcrime.securesms.components.audioplay.AudioPlaybackViewModel;
import org.thoughtcrime.securesms.components.audioplay.AudioView;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.mms.AudioSlide;
import org.thoughtcrime.securesms.mms.DocumentSlide;
@@ -71,7 +72,6 @@ import org.thoughtcrime.securesms.util.MediaUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.views.Stub;
import org.thoughtcrime.securesms.calls.CallUtil;
import java.util.List;
import java.util.Set;
@@ -181,9 +181,11 @@ public class ConversationItem extends BaseConversationItem
@NonNull GlideRequests glideRequests,
@NonNull Set<DcMsg> batchSelected,
@NonNull Recipient recipients,
boolean pulseHighlight)
boolean pulseHighlight,
@Nullable AudioPlaybackViewModel playbackViewModel,
AudioView.OnActionListener audioPlayPauseListener)
{
bind(messageRecord, dcChat, batchSelected, pulseHighlight, recipients);
bindPartial(messageRecord, dcChat, batchSelected, pulseHighlight, recipients);
this.glideRequests = glideRequests;
this.showSender = ((dcChat.isMultiUser() || dcChat.isSelfTalk()) && !messageRecord.isOutgoing()) || messageRecord.getOverrideSenderName() != null;
@@ -204,7 +206,7 @@ public class ConversationItem extends BaseConversationItem
setGutterSizes(messageRecord, showSender);
setMessageShape(messageRecord);
setMediaAttributes(messageRecord, showSender);
setMediaAttributes(messageRecord, showSender, playbackViewModel, audioPlayPauseListener);
setBodyText(messageRecord);
setBubbleState(messageRecord);
setContactPhoto();
@@ -482,24 +484,10 @@ public class ConversationItem extends BaseConversationItem
}
private void setMediaAttributes(@NonNull DcMsg messageRecord,
boolean showSender)
boolean showSender,
AudioPlaybackViewModel playbackViewModel,
AudioView.OnActionListener audioPlayPauseListener)
{
class SetDurationListener implements AudioSlidePlayer.Listener {
@Override
public void onStart() {}
@Override
public void onStop() {}
@Override
public void onProgress(AudioSlide slide, double progress, long millis) {}
@Override
public void onReceivedDuration(int millis) {
messageRecord.lateFilingMediaSize(0,0, millis);
audioViewStub.get().setDuration(millis);
}
}
if (hasAudio(messageRecord)) {
audioViewStub.get().setVisibility(View.VISIBLE);
if (mediaThumbnailStub.resolved()) mediaThumbnailStub.get().setVisibility(View.GONE);
@@ -509,15 +497,9 @@ public class ConversationItem extends BaseConversationItem
if (vcardViewStub.resolved()) vcardViewStub.get().setVisibility(View.GONE);
if (callViewStub.resolved()) callViewStub.get().setVisibility(View.GONE);
//noinspection ConstantConditions
int duration = messageRecord.getDuration();
if (duration == 0) {
AudioSlide audio = new AudioSlide(context, messageRecord);
AudioSlidePlayer audioSlidePlayer = AudioSlidePlayer.createFor(getContext(), audio, new SetDurationListener());
audioSlidePlayer.requestDuration();
}
audioViewStub.get().setAudio(new AudioSlide(context, messageRecord), duration);
audioViewStub.get().setPlaybackViewModel(playbackViewModel);
audioViewStub.get().setOnActionListener(audioPlayPauseListener);
audioViewStub.get().setAudio(new AudioSlide(context, messageRecord));
audioViewStub.get().setOnClickListener(passthroughClickListener);
audioViewStub.get().setOnLongClickListener(passthroughClickListener);
audioViewStub.get().setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
@@ -825,8 +807,6 @@ public class ConversationItem extends BaseConversationItem
return stickerStub.get().getFooter();
} else if (hasOnlyThumbnail(messageRecord) && TextUtils.isEmpty(messageRecord.getText())) {
return mediaThumbnailStub.get().getFooter();
} else if (messageRecord.getType() == DcMsg.DC_MSG_CALL) {
return callViewStub.get().getFooter();
} else {
return footer;
}
@@ -987,6 +967,8 @@ public class ConversationItem extends BaseConversationItem
public void onClick(final View v, final Slide slide) {
if (shouldInterceptClicks(messageRecord) || !batchSelected.isEmpty()) {
performClick();
} else if (eventListener != null) {
eventListener.onStickerClicked(messageRecord);
}
}
}
@@ -1000,9 +982,9 @@ public class ConversationItem extends BaseConversationItem
int chatId = messageRecord.getChatId();
if (!messageRecord.isOutgoing() && callInfo.state instanceof CallState.Alerting) {
int callId = messageRecord.getId();
CallUtil.openCall(getContext(), accId, chatId, callId, callInfo.sdpOffer);
CallUtil.openCall(getContext(), accId, chatId, callId, callInfo.sdpOffer, callInfo.hasVideo);
} else {
CallUtil.startCall(getContext(), accId, chatId);
CallUtil.startCall(getContext(), accId, chatId, callInfo.hasVideo);
}
}
}
@@ -6,40 +6,37 @@ import android.graphics.Canvas;
import android.os.Vibrator;
import android.view.MotionEvent;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcMsg;
import org.thoughtcrime.securesms.util.AccessibilityUtil;
import org.thoughtcrime.securesms.util.ServiceUtil;
class ConversationItemSwipeCallback extends ItemTouchHelper.SimpleCallback {
private static final float SWIPE_SUCCESS_DX = ConversationSwipeAnimationHelper.TRIGGER_DX;
private static final long SWIPE_SUCCESS_VIBE_TIME_MS = 10;
private static final float SWIPE_SUCCESS_DX = ConversationSwipeAnimationHelper.TRIGGER_DX;
private static final long SWIPE_SUCCESS_VIBE_TIME_MS = 10;
private boolean swipeBack;
private boolean shouldTriggerSwipeFeedback;
private boolean canTriggerSwipe;
private float latestDownX;
private float latestDownY;
private float latestDownX;
private float latestDownY;
private final SwipeAvailabilityProvider swipeAvailabilityProvider;
private final SwipeAvailabilityProvider swipeAvailabilityProvider;
private final ConversationItemTouchListener itemTouchListener;
private final OnSwipeListener onSwipeListener;
private final OnSwipeListener onSwipeListener;
ConversationItemSwipeCallback(@NonNull SwipeAvailabilityProvider swipeAvailabilityProvider,
@NonNull OnSwipeListener onSwipeListener)
{
ConversationItemSwipeCallback(
@NonNull SwipeAvailabilityProvider swipeAvailabilityProvider,
@NonNull OnSwipeListener onSwipeListener) {
super(0, ItemTouchHelper.END);
this.itemTouchListener = new ConversationItemTouchListener(this::updateLatestDownCoordinate);
this.swipeAvailabilityProvider = swipeAvailabilityProvider;
this.onSwipeListener = onSwipeListener;
this.itemTouchListener = new ConversationItemTouchListener(this::updateLatestDownCoordinate);
this.swipeAvailabilityProvider = swipeAvailabilityProvider;
this.onSwipeListener = onSwipeListener;
this.shouldTriggerSwipeFeedback = true;
this.canTriggerSwipe = true;
this.canTriggerSwipe = true;
}
void attachToRecyclerView(@NonNull RecyclerView recyclerView) {
@@ -48,21 +45,19 @@ class ConversationItemSwipeCallback extends ItemTouchHelper.SimpleCallback {
}
@Override
public boolean onMove(@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder,
@NonNull RecyclerView.ViewHolder target)
{
public boolean onMove(
@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder,
@NonNull RecyclerView.ViewHolder target) {
return false;
}
@Override
public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
}
public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {}
@Override
public int getSwipeDirs(@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder)
{
public int getSwipeDirs(
@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
if (cannotSwipeViewHolder(viewHolder)) return 0;
return super.getSwipeDirs(recyclerView, viewHolder);
}
@@ -78,18 +73,21 @@ class ConversationItemSwipeCallback extends ItemTouchHelper.SimpleCallback {
@Override
public void onChildDraw(
@NonNull Canvas c,
@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder,
float dx, float dy, int actionState, boolean isCurrentlyActive)
{
@NonNull Canvas c,
@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder,
float dx,
float dy,
int actionState,
boolean isCurrentlyActive) {
if (cannotSwipeViewHolder(viewHolder)) return;
float sign = getSignFromDirection(viewHolder.itemView);
float sign = getSignFromDirection(viewHolder.itemView);
boolean isCorrectSwipeDir = sameSign(dx, sign);
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE && isCorrectSwipeDir) {
ConversationSwipeAnimationHelper.update((ConversationItem) viewHolder.itemView, Math.abs(dx), sign);
ConversationSwipeAnimationHelper.update(
(ConversationItem) viewHolder.itemView, Math.abs(dx), sign);
handleSwipeFeedback((ConversationItem) viewHolder.itemView, Math.abs(dx));
if (canTriggerSwipe) {
setTouchListener(recyclerView, viewHolder, Math.abs(dx));
@@ -100,7 +98,7 @@ class ConversationItemSwipeCallback extends ItemTouchHelper.SimpleCallback {
if (dx == 0) {
shouldTriggerSwipeFeedback = true;
canTriggerSwipe = true;
canTriggerSwipe = true;
}
}
@@ -122,50 +120,50 @@ class ConversationItemSwipeCallback extends ItemTouchHelper.SimpleCallback {
}
@SuppressLint("ClickableViewAccessibility")
private void setTouchListener(@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder,
float dx)
{
recyclerView.setOnTouchListener(new View.OnTouchListener() {
private void setTouchListener(
@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dx) {
recyclerView.setOnTouchListener(
new View.OnTouchListener() {
// This variable is necessary to make sure that the handleTouchActionUp() and therefore onSwiped() is called only once.
// Otherwise, any subsequent little swipe would invoke onSwiped().
// We can't call recyclerView.setOnTouchListener(null) because another ConversationItem might have set its own
// on touch listener in the meantime and we don't want to cancel it
private boolean listenerCalled = false;
// This variable is necessary to make sure that the handleTouchActionUp() and therefore
// onSwiped() is called only once.
// Otherwise, any subsequent little swipe would invoke onSwiped().
// We can't call recyclerView.setOnTouchListener(null) because another ConversationItem
// might have set its own
// on touch listener in the meantime and we don't want to cancel it
private boolean listenerCalled = false;
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
shouldTriggerSwipeFeedback = true;
break;
case MotionEvent.ACTION_UP:
if (!listenerCalled) {
listenerCalled = true;
ConversationItemSwipeCallback.this.handleTouchActionUp(recyclerView, viewHolder, dx);
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
shouldTriggerSwipeFeedback = true;
break;
case MotionEvent.ACTION_UP:
if (!listenerCalled) {
listenerCalled = true;
ConversationItemSwipeCallback.this.handleTouchActionUp(
recyclerView, viewHolder, dx);
}
// fallthrough
case MotionEvent.ACTION_CANCEL:
swipeBack = true;
shouldTriggerSwipeFeedback = false;
// Sometimes the view does not go back correctly, so make sure that after 2s the
// progress is reset:
viewHolder.itemView.postDelayed(() -> resetProgress(viewHolder), 2000);
if (AccessibilityUtil.areAnimationsDisabled(viewHolder.itemView.getContext())) {
resetProgress(viewHolder);
}
break;
}
//fallthrough
case MotionEvent.ACTION_CANCEL:
swipeBack = true;
shouldTriggerSwipeFeedback = false;
// Sometimes the view does not go back correctly, so make sure that after 2s the progress is reset:
viewHolder.itemView.postDelayed(() -> resetProgress(viewHolder), 2000);
if (AccessibilityUtil.areAnimationsDisabled(viewHolder.itemView.getContext())) {
resetProgress(viewHolder);
}
break;
}
return false;
}
});
return false;
}
});
}
private void handleTouchActionUp(@NonNull RecyclerView recyclerView,
@NonNull RecyclerView.ViewHolder viewHolder,
float dx)
{
private void handleTouchActionUp(
@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dx) {
if (dx > SWIPE_SUCCESS_DX) {
canTriggerSwipe = false;
onSwiped(viewHolder);
@@ -177,17 +175,16 @@ class ConversationItemSwipeCallback extends ItemTouchHelper.SimpleCallback {
}
private static void resetProgress(RecyclerView.ViewHolder viewHolder) {
ConversationSwipeAnimationHelper.update((ConversationItem) viewHolder.itemView,
0f,
getSignFromDirection(viewHolder.itemView));
ConversationSwipeAnimationHelper.update(
(ConversationItem) viewHolder.itemView, 0f, getSignFromDirection(viewHolder.itemView));
}
private boolean cannotSwipeViewHolder(@NonNull RecyclerView.ViewHolder viewHolder) {
if (!(viewHolder.itemView instanceof ConversationItem)) return true;
ConversationItem item = ((ConversationItem) viewHolder.itemView);
return !swipeAvailabilityProvider.isSwipeAvailable(item.getMessageRecord()) ||
item.disallowSwipe(latestDownX, latestDownY);
return !swipeAvailabilityProvider.isSwipeAvailable(item.getMessageRecord())
|| item.disallowSwipe(latestDownX, latestDownY);
}
private void updateLatestDownCoordinate(float x, float y) {
@@ -1,7 +1,6 @@
package org.thoughtcrime.securesms;
import android.view.MotionEvent;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
@@ -16,12 +16,11 @@
*/
package org.thoughtcrime.securesms;
import static org.thoughtcrime.securesms.ConversationActivity.CHAT_ID_EXTRA;
import static org.thoughtcrime.securesms.ConversationActivity.STARTING_POSITION_EXTRA;
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_PROXY_ENABLED;
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_PROXY_URL;
import static org.thoughtcrime.securesms.util.ShareUtil.acquireRelayMessageContent;
import static org.thoughtcrime.securesms.util.ShareUtil.getDirectSharingChatId;
import static org.thoughtcrime.securesms.util.ShareUtil.getForwardedMessageAccountId;
import static org.thoughtcrime.securesms.util.ShareUtil.getSharedTitle;
import static org.thoughtcrime.securesms.util.ShareUtil.isDirectSharing;
import static org.thoughtcrime.securesms.util.ShareUtil.isForwarding;
@@ -29,6 +28,7 @@ import static org.thoughtcrime.securesms.util.ShareUtil.isRelayingMessageContent
import static org.thoughtcrime.securesms.util.ShareUtil.resetRelayingMessageContent;
import android.Manifest;
import android.app.Activity;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Color;
@@ -45,13 +45,16 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.appcompat.widget.TooltipCompat;
import androidx.core.view.MenuCompat;
import chat.delta.rpc.types.SecurejoinSource;
import chat.delta.rpc.types.SecurejoinUiPath;
import com.amulyakhare.textdrawable.TextDrawable;
import com.b44t.messenger.DcAccounts;
import com.b44t.messenger.DcContact;
@@ -59,7 +62,8 @@ import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcMsg;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import java.util.ArrayList;
import java.util.Date;
import org.thoughtcrime.securesms.components.AvatarView;
import org.thoughtcrime.securesms.components.SearchToolbar;
import org.thoughtcrime.securesms.connect.AccountManager;
@@ -76,37 +80,50 @@ import org.thoughtcrime.securesms.search.SearchFragment;
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme;
import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.Prefs;
import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.SaveAttachmentTask;
import org.thoughtcrime.securesms.util.ScreenLockUtil;
import org.thoughtcrime.securesms.util.SendRelayedMessageUtil;
import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.StorageUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import chat.delta.rpc.types.SecurejoinSource;
import chat.delta.rpc.types.SecurejoinUiPath;
import java.util.ArrayList;
import java.util.Date;
public class ConversationListActivity extends PassphraseRequiredActionBarActivity
implements ConversationListFragment.ConversationSelectedListener
{
implements ConversationListFragment.ConversationSelectedListener {
private static final String TAG = ConversationListActivity.class.getSimpleName();
private static final String OPENPGP4FPR = "openpgp4fpr";
private static final String NDK_ARCH_WARNED = "ndk_arch_warned";
public static final String CLEAR_NOTIFICATIONS = "clear_notifications";
public static final String ACCOUNT_ID_EXTRA = "account_id";
public static final String FROM_WELCOME = "from_welcome";
public static final String FROM_WELCOME = "from_welcome";
public static final String FROM_WELCOME_RAW_QR = "from_welcome_raw_qr";
private ConversationListFragment conversationListFragment;
public TextView title;
private AvatarView selfAvatar;
private ImageView unreadIndicator;
private SearchFragment searchFragment;
private SearchToolbar searchToolbar;
private ImageView searchAction;
private ViewGroup fragmentContainer;
private ViewGroup selfAvatarContainer;
public TextView title;
private AvatarView selfAvatar;
private ImageView unreadIndicator;
private SearchFragment searchFragment;
private SearchToolbar searchToolbar;
private ImageView searchAction;
private ViewGroup fragmentContainer;
private ViewGroup selfAvatarContainer;
/**
* used to store temporarily scanned QR to pass it back to QrCodeHandler when ScreenLockUtil is
* used
*/
private String qrData = null;
private ActivityResultLauncher<Intent> relayLockLauncher;
private ActivityResultLauncher<Intent> qrScannerLauncher;
/**
* used to store temporarily profile ID to delete after authorization is granted via
* ScreenLockUtil
*/
private int deleteProfileId = 0;
private ActivityResultLauncher<Intent> deleteProfileLockLauncher;
@Override
protected void onPreCreate() {
@@ -116,36 +133,47 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
@Override
protected void onCreate(Bundle icicle, boolean ready) {
// update messages - for new messages, do not reuse or modify strings but create new ones.
// it is not needed to keep all past update messages, however, when deleted, also the strings should be deleted.
try {
DcContext dcContext = DcHelper.getContext(this);
final String deviceMsgLabel = "update_2_33_1_android";
if (!dcContext.wasDeviceMsgEverAdded(deviceMsgLabel)) {
DcMsg msg = null;
if (!getIntent().getBooleanExtra(FROM_WELCOME, false)) {
msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
relayLockLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == RESULT_OK) {
// QrCodeHandler requested user authorization before adding a relay
// and it was granted, so proceed to add the relay
if (qrData != null) {
new QrCodeHandler(this).addRelay(qrData);
qrData = null;
}
}
});
deleteProfileLockLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == RESULT_OK) {
if (deleteProfileId != 0) {
deleteProfile(deleteProfileId);
deleteProfileId = 0;
}
}
});
qrScannerLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == RESULT_OK) {
IntentResult scanResult =
IntentIntegrator.parseActivityResult(result.getResultCode(), result.getData());
qrData = scanResult.getContents();
new QrCodeHandler(this)
.handleQrData(
qrData, SecurejoinSource.Scan, SecurejoinUiPath.QrIcon, relayLockLauncher);
}
});
// InputStream inputStream = getResources().getAssets().open("device-messages/green-checkmark.jpg");
// String outputFile = DcHelper.getBlobdirFile(dcContext, "green-checkmark", ".jpg");
// Util.copy(inputStream, new FileOutputStream(outputFile));
// msg.setFile(outputFile, "image/jpeg");
msg.setText(getString(R.string.update_2_33, "https://arcanechat.me/#contribute"));
}
dcContext.addDeviceMsg(deviceMsgLabel, msg);
if (Prefs.getStringPreference(this, Prefs.LAST_DEVICE_MSG_LABEL, "").equals(deviceMsgLabel)) {
int deviceChatId = dcContext.getChatIdByContactId(DcContact.DC_CONTACT_ID_DEVICE);
if (deviceChatId != 0) {
dcContext.marknoticedChat(deviceChatId);
}
}
Prefs.setStringPreference(this, Prefs.LAST_DEVICE_MSG_LABEL, deviceMsgLabel);
}
} catch(Exception e) {
e.printStackTrace();
addDeviceMessages(getIntent().getBooleanExtra(FROM_WELCOME, false));
if (getIntent().getIntExtra(ACCOUNT_ID_EXTRA, -1) <= 0) {
getIntent().putExtra(ACCOUNT_ID_EXTRA, DcHelper.getContext(this).getAccountId());
}
// create view
@@ -153,44 +181,88 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
selfAvatar = findViewById(R.id.self_avatar);
selfAvatarContainer = findViewById(R.id.self_avatar_container);
unreadIndicator = findViewById(R.id.unread_indicator);
title = findViewById(R.id.toolbar_title);
searchToolbar = findViewById(R.id.search_toolbar);
searchAction = findViewById(R.id.search_action);
fragmentContainer = findViewById(R.id.fragment_container);
selfAvatar = findViewById(R.id.self_avatar);
selfAvatarContainer = findViewById(R.id.self_avatar_container);
unreadIndicator = findViewById(R.id.unread_indicator);
title = findViewById(R.id.toolbar_title);
searchToolbar = findViewById(R.id.search_toolbar);
searchAction = findViewById(R.id.search_action);
fragmentContainer = findViewById(R.id.fragment_container);
// add margin to avoid content hidden behind system bars
ViewUtil.applyWindowInsetsAsMargin(searchToolbar, true, true, true, false);
Bundle bundle = new Bundle();
conversationListFragment = initFragment(R.id.fragment_container, new ConversationListFragment(), bundle);
conversationListFragment =
initFragment(R.id.fragment_container, new ConversationListFragment(), bundle);
initializeSearchListener();
getOnBackPressedDispatcher()
.addCallback(
this,
new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
if (searchToolbar.isVisible()) {
searchToolbar.collapse();
} else {
Activity activity = ConversationListActivity.this;
if (isRelayingMessageContent(activity)) {
int selectedAccId = DcHelper.getContext(activity).getAccountId();
int initialAccId = getIntent().getIntExtra(ACCOUNT_ID_EXTRA, selectedAccId);
if (initialAccId != selectedAccId) {
// allowing to go back is dangerous, it could be activity on previously
// selected account,
// instead of figuring out account rollback in onResume in each activity
// (conversation, gallery, media preview, webxdc, etc.)
// just clear the back stack and stay in newly selected account
finishAffinity();
startActivity(new Intent(activity, ConversationListActivity.class));
return;
} else {
handleResetRelaying();
}
}
setEnabled(false);
getOnBackPressedDispatcher().onBackPressed();
}
}
});
TooltipCompat.setTooltipText(searchAction, getText(R.string.search_explain));
TooltipCompat.setTooltipText(selfAvatar, getText(R.string.switch_account));
selfAvatar.setOnClickListener(v -> AccountManager.getInstance().showSwitchAccountMenu(this));
findViewById(R.id.avatar_and_title).setOnClickListener(v -> {
if (!isRelayingMessageContent(this)) {
AccountManager.getInstance().showSwitchAccountMenu(this);
}
});
selfAvatar.setOnClickListener(
v -> AccountManager.getInstance().showSwitchAccountMenu(this, false));
findViewById(R.id.avatar_and_title)
.setOnClickListener(
v -> {
if (!isRelayingMessageContent(this)) {
AccountManager.getInstance().showSwitchAccountMenu(this, false);
}
});
refresh();
if (BuildConfig.DEBUG) checkNdkArchitecture();
DcHelper.maybeShowMigrationError(this);
String rawQrString = getIntent().getStringExtra(FROM_WELCOME_RAW_QR);
// Launch chat directly, if coming from onboarding with a join chat/group QR
if (rawQrString != null) {
QrCodeHandler qrCodeHandler = new QrCodeHandler(this);
qrCodeHandler.secureJoinByQr(rawQrString, SecurejoinSource.Scan, SecurejoinUiPath.Unknown);
}
}
/**
* If the build script is invoked with a specific architecture (e.g.`ndk-make.sh arm64-v8a`), it
* will compile the core only for this arch. This method checks if the arch was correct.
*
* In order to do this, `ndk-make.sh` writes its argument into the file `ndkArch`.
* <p>In order to do this, `ndk-make.sh` writes its argument into the file `ndkArch`.
* `getNdkArch()` in `build.gradle` then reads this file and its content is assigned to
* `BuildConfig.NDK_ARCH`.
*/
@@ -203,7 +275,8 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
String arch;
// armv8l is 32 bit mode in 64 bit CPU:
if (archProperty.startsWith("armv7") || archProperty.startsWith("armv8l")) arch = "armeabi-v7a";
if (archProperty.startsWith("armv7") || archProperty.startsWith("armv8l"))
arch = "armeabi-v7a";
else if (archProperty.equals("aarch64")) arch = "arm64-v8a";
else if (archProperty.equals("i686")) arch = "x86";
else if (archProperty.equals("x86_64")) arch = "x86_64";
@@ -217,23 +290,35 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
String message;
if (arch.equals("")) {
message = "This phone has the unknown architecture " + archProperty + ".\n\n"+
"Please open an issue at https://github.com/deltachat/deltachat-android/issues.";
message =
"This phone has the unknown architecture "
+ archProperty
+ ".\n\n"
+ "Please open an issue at https://github.com/deltachat/deltachat-android/issues.";
} else {
message = "Apparently you used `ndk-make.sh " + BuildConfig.NDK_ARCH + "`, but this device is " + arch + ".\n\n" +
"You can use the app, but changes you made to the Rust code were not applied.\n\n" +
"To compile in your changes, you can:\n" +
"- Either run `ndk-make.sh " + arch + "` to build only for " + arch + " in debug mode\n" +
"- Or run `ndk-make.sh` without argument to build for all architectures in release mode\n\n" +
"If something doesn't work, please open an issue at https://github.com/deltachat/deltachat-android/issues!!";
message =
"Apparently you used `ndk-make.sh "
+ BuildConfig.NDK_ARCH
+ "`, but this device is "
+ arch
+ ".\n\n"
+ "You can use the app, but changes you made to the Rust code were not applied.\n\n"
+ "To compile in your changes, you can:\n"
+ "- Either run `ndk-make.sh "
+ arch
+ "` to build only for "
+ arch
+ " in debug mode\n"
+ "- Or run `ndk-make.sh` without argument to build for all architectures in release mode\n\n"
+ "If something doesn't work, please open an issue at https://github.com/deltachat/deltachat-android/issues!!";
}
Log.e(TAG, message);
if (!Prefs.getBooleanPreference(this, NDK_ARCH_WARNED, false)) {
new AlertDialog.Builder(this)
.setMessage(message)
.setPositiveButton(android.R.string.ok, null)
.show();
.setMessage(message)
.setPositiveButton(android.R.string.ok, null)
.show();
Prefs.setBooleanPreference(this, NDK_ARCH_WARNED, true);
}
}
@@ -250,24 +335,29 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
}
super.onNewIntent(intent);
setIntent(intent);
if (getIntent().getIntExtra(ACCOUNT_ID_EXTRA, -1) <= 0) {
getIntent().putExtra(ACCOUNT_ID_EXTRA, DcHelper.getContext(this).getAccountId());
}
refresh();
conversationListFragment.onNewIntent();
invalidateOptionsMenu();
}
private void refresh() {
DcContext dcContext = DcHelper.getContext(this);
int accountId = getIntent().getIntExtra(ACCOUNT_ID_EXTRA, dcContext.getAccountId());
int selectedAccId = DcHelper.getContext(this).getAccountId();
int accountId = getIntent().getIntExtra(ACCOUNT_ID_EXTRA, selectedAccId);
if (getIntent().getBooleanExtra(CLEAR_NOTIFICATIONS, false)) {
DcHelper.getNotificationCenter(this).removeAllNotifications(accountId);
}
if (accountId != dcContext.getAccountId()) {
AccountManager.getInstance().switchAccountAndStartActivity(this, accountId);
if (accountId != selectedAccId) {
AccountManager.getInstance().switchAccount(this, accountId);
onProfileSwitched(accountId);
} else {
refreshAvatar();
refreshUnreadIndicator();
refreshTitle();
}
refreshAvatar();
refreshUnreadIndicator();
refreshTitle();
handleOpenpgp4fpr();
if (isDirectSharing(this)) {
openConversation(getDirectSharingChatId(this), -1);
@@ -289,7 +379,8 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} else {
title.setText(DcHelper.getContext(this).getName());
// refreshTitle is called by ConversationListFragment when connectivity changes so update connectivity dot here
// refreshTitle is called by ConversationListFragment when connectivity changes so update
// connectivity dot here
selfAvatar.setConnectivity(DcHelper.getContext(this).getConnectivity());
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
}
@@ -325,23 +416,26 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
}
}
if(unreadCount == 0) {
if (unreadCount == 0) {
unreadIndicator.setVisibility(View.GONE);
} else {
boolean isDarkTheme = DynamicTheme.isDarkTheme(this);
int badgeColor = Color.WHITE;
if (isDarkTheme) {
final TypedArray attrs = obtainStyledAttributes(new int[] {
R.attr.conversation_list_item_unreadcount_color,
});
final TypedArray attrs =
obtainStyledAttributes(
new int[] {
R.attr.conversation_list_item_unreadcount_color,
});
badgeColor = attrs.getColor(0, Color.BLACK);
}
String label = unreadCount>99? "99+" : String.valueOf(unreadCount);
unreadIndicator.setImageDrawable(TextDrawable.builder()
String label = unreadCount > 99 ? "99+" : String.valueOf(unreadCount);
unreadIndicator.setImageDrawable(
TextDrawable.builder()
.beginConfig()
.width(ViewUtil.dpToPx(this, 20))
.height(ViewUtil.dpToPx(this, 20))
.textColor(isDarkTheme? Color.WHITE : Color.BLACK)
.textColor(isDarkTheme ? Color.WHITE : Color.BLACK)
.bold()
.endConfig()
.buildRound(label, badgeColor));
@@ -364,9 +458,8 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
if (isRelayingMessageContent(this)) {
inflater.inflate(R.menu.forwarding_menu, menu);
menu.findItem(R.id.menu_export_attachment).setVisible(
ShareUtil.isFromWebxdc(this) && ShareUtil.getSharedUris(this).size() == 1
);
menu.findItem(R.id.menu_export_attachment)
.setVisible(ShareUtil.isFromWebxdc(this) && ShareUtil.getSharedUris(this).size() == 1);
} else {
inflater.inflate(R.menu.text_secure_normal, menu);
menu.findItem(R.id.menu_global_map).setVisible(Prefs.isLocationStreamingEnabled(this));
@@ -375,7 +468,8 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
proxyItem.setVisible(false);
} else {
boolean proxyEnabled = DcHelper.getInt(this, CONFIG_PROXY_ENABLED) == 1;
proxyItem.setIcon(proxyEnabled? R.drawable.ic_proxy_enabled_24 : R.drawable.ic_proxy_disabled_24);
proxyItem.setIcon(
proxyEnabled ? R.drawable.ic_proxy_enabled_24 : R.drawable.ic_proxy_disabled_24);
proxyItem.setVisible(true);
}
MenuCompat.setGroupDividerEnabled(menu, true);
@@ -386,42 +480,42 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
}
private void initializeSearchListener() {
searchAction.setOnClickListener(v -> {
searchToolbar.display(searchAction.getX() + (searchAction.getWidth() / 2),
searchAction.getY() + (searchAction.getHeight() / 2));
});
searchAction.setOnClickListener(
v -> {
searchToolbar.display(
searchAction.getX() + (searchAction.getWidth() / 2),
searchAction.getY() + (searchAction.getHeight() / 2));
});
searchToolbar.setListener(new SearchToolbar.SearchListener() {
@Override
public void onSearchTextChange(String text) {
String trimmed = text.trim();
searchToolbar.setListener(
new SearchToolbar.SearchListener() {
@Override
public void onSearchTextChange(String text) {
String trimmed = text.trim();
if (trimmed.length() > 0) {
if (searchFragment == null) {
searchFragment = SearchFragment.newInstance();
getSupportFragmentManager().beginTransaction()
.add(R.id.fragment_container, searchFragment, null)
.commit();
if (trimmed.length() > 0) {
if (searchFragment == null) {
searchFragment = SearchFragment.newInstance();
getSupportFragmentManager()
.beginTransaction()
.add(R.id.fragment_container, searchFragment, null)
.commit();
}
searchFragment.updateSearchQuery(trimmed);
} else if (searchFragment != null) {
getSupportFragmentManager().beginTransaction().remove(searchFragment).commit();
searchFragment = null;
}
}
searchFragment.updateSearchQuery(trimmed);
} else if (searchFragment != null) {
getSupportFragmentManager().beginTransaction()
.remove(searchFragment)
.commit();
searchFragment = null;
}
}
@Override
public void onSearchClosed() {
if (searchFragment != null) {
getSupportFragmentManager().beginTransaction()
.remove(searchFragment)
.commit();
searchFragment = null;
}
}
});
@Override
public void onSearchClosed() {
if (searchFragment != null) {
getSupportFragmentManager().beginTransaction().remove(searchFragment).commit();
searchFragment = null;
}
}
});
}
@Override
@@ -436,7 +530,9 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
startActivity(new Intent(this, ApplicationPreferencesActivity.class));
return true;
} else if (itemId == R.id.menu_qr) {
new IntentIntegrator(this).setCaptureActivity(QrActivity.class).initiateScan();
Intent intent =
new IntentIntegrator(this).setCaptureActivity(QrActivity.class).createScanIntent();
qrScannerLauncher.launch(intent);
return true;
} else if (itemId == R.id.menu_global_map) {
WebxdcActivity.openMaps(this, 0);
@@ -445,51 +541,56 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
startActivity(new Intent(this, ProxySettingsActivity.class));
return true;
} else if (itemId == android.R.id.home) {
onBackPressed();
getOnBackPressedDispatcher().onBackPressed();
return true;
} else if (itemId == R.id.menu_all_media) {
startActivity(new Intent(this, AllMediaActivity.class));
return true;
} else if (itemId == R.id.menu_export_attachment) {
handleSaveAttachment();
} else if (itemId == R.id.menu_switch_account) {
AccountManager.getInstance().showSwitchAccountMenu(this, true);
return true;
}
return false;
}
private void handleSaveAttachment() {
SaveAttachmentTask.showWarningDialog(this, (dialogInterface, i) -> {
if (StorageUtil.canWriteToMediaStore(this)) {
performSave();
return;
}
SaveAttachmentTask.showWarningDialog(
this,
(dialogInterface, i) -> {
if (StorageUtil.canWriteToMediaStore(this)) {
performSave();
return;
}
Permissions.with(this)
Permissions.with(this)
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.alwaysGrantOnSdk30()
.ifNecessary()
.withPermanentDenialDialog(getString(R.string.perm_explain_access_to_storage_denied))
.onAllGranted(this::performSave)
.execute();
});
});
}
private void performSave() {
ArrayList<Uri> uriList = ShareUtil.getSharedUris(this);
ArrayList<Uri> uriList = ShareUtil.getSharedUris(this);
Uri uri = uriList.get(0);
String mimeType = PersistentBlobProvider.getMimeType(this, uri);
String fileName = PersistentBlobProvider.getFileName(this, uri);
SaveAttachmentTask.Attachment[] attachments = new SaveAttachmentTask.Attachment[]{
new SaveAttachmentTask.Attachment(uri, mimeType, new Date().getTime(), fileName)
};
SaveAttachmentTask.Attachment[] attachments =
new SaveAttachmentTask.Attachment[] {
new SaveAttachmentTask.Attachment(uri, mimeType, new Date().getTime(), fileName)
};
SaveAttachmentTask saveTask = new SaveAttachmentTask(this);
saveTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, attachments);
onBackPressed();
getOnBackPressedDispatcher().onBackPressed();
}
private void handleOpenpgp4fpr() {
if (getIntent() != null &&
Intent.ACTION_VIEW.equals(getIntent().getAction())) {
if (getIntent() != null && Intent.ACTION_VIEW.equals(getIntent().getAction())) {
Uri uri = getIntent().getData();
if (uri == null) {
return;
@@ -497,7 +598,7 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
if (uri.getScheme().equalsIgnoreCase(OPENPGP4FPR) || Util.isInviteURL(uri)) {
QrCodeHandler qrCodeHandler = new QrCodeHandler(this);
qrCodeHandler.handleQrData(uri.toString(), SecurejoinSource.ExternalLink, null);
qrCodeHandler.handleOnlySecureJoinQr(uri.toString(), SecurejoinSource.ExternalLink, null);
}
}
}
@@ -519,15 +620,21 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
searchToolbar.clearFocus();
final DcContext dcContext = DcHelper.getContext(this);
if (isForwarding(this) && dcContext.getChat(chatId).isSelfTalk()) {
int fwdAccId = getForwardedMessageAccountId(this);
if (fwdAccId == dcContext.getAccountId() && dcContext.getChat(chatId).isSelfTalk()) {
SendRelayedMessageUtil.immediatelyRelay(this, chatId);
Toast.makeText(this, DynamicTheme.getCheckmarkEmoji(this) + " " + getString(R.string.saved), Toast.LENGTH_SHORT).show();
Toast.makeText(
this,
DynamicTheme.getCheckmarkEmoji(this) + " " + getString(R.string.saved),
Toast.LENGTH_SHORT)
.show();
handleResetRelaying();
finish();
} else {
Intent intent = new Intent(this, ConversationActivity.class);
intent.putExtra(CHAT_ID_EXTRA, chatId);
intent.putExtra(STARTING_POSITION_EXTRA, startingPosition);
intent.putExtra(ConversationActivity.ACCOUNT_ID_EXTRA, dcContext.getAccountId());
intent.putExtra(ConversationActivity.CHAT_ID_EXTRA, chatId);
intent.putExtra(ConversationActivity.STARTING_POSITION_EXTRA, startingPosition);
if (isRelayingMessageContent(this)) {
acquireRelayMessageContent(this, intent);
}
@@ -547,15 +654,6 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
overridePendingTransition(R.anim.slide_from_right, R.anim.fade_scale_out);
}
@Override
public void onBackPressed() {
if (searchToolbar.isVisible()) searchToolbar.collapse();
else if (isRelayingMessageContent(this)) {
handleResetRelaying();
finish();
} else super.onBackPressed();
}
private void createChat() {
Intent intent = new Intent(this, NewConversationActivity.class);
if (isRelayingMessageContent(this)) {
@@ -572,22 +670,88 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
startActivity(Intent.createChooser(intent, getString(R.string.chat_share_with_title)));
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case IntentIntegrator.REQUEST_CODE:
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
QrCodeHandler qrCodeHandler = new QrCodeHandler(this);
qrCodeHandler.onScanPerformed(scanResult, SecurejoinUiPath.QrIcon);
break;
default:
break;
private void addDeviceMessages(boolean fromWelcome) {
// update messages - for new messages, do not reuse or modify strings but create new ones.
// it is not needed to keep all past update messages, however, when deleted, also the strings
// should be deleted.
try {
DcContext dcContext = DcHelper.getContext(this);
final String deviceMsgLabel = "update_2_33_1_android";
if (!dcContext.wasDeviceMsgEverAdded(deviceMsgLabel)) {
DcMsg msg = null;
if (!getIntent().getBooleanExtra(FROM_WELCOME, false)) {
msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
// InputStream inputStream =
// getResources().getAssets().open("device-messages/green-checkmark.jpg");
// String outputFile = DcHelper.getBlobdirFile(dcContext, "green-checkmark", ".jpg");
// Util.copy(inputStream, new FileOutputStream(outputFile));
// msg.setFile(outputFile, "image/jpeg");
msg.setText(getString(R.string.update_2_33, "https://arcanechat.me/#contribute"));
}
dcContext.addDeviceMsg(deviceMsgLabel, msg);
if (Prefs.getStringPreference(this, Prefs.LAST_DEVICE_MSG_LABEL, "")
.equals(deviceMsgLabel)) {
int deviceChatId = dcContext.getChatIdByContactId(DcContact.DC_CONTACT_ID_DEVICE);
if (deviceChatId != 0) {
dcContext.marknoticedChat(deviceChatId);
}
}
Prefs.setStringPreference(this, Prefs.LAST_DEVICE_MSG_LABEL, deviceMsgLabel);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void onProfileSwitched(int profileId) {
addDeviceMessages(false);
refreshAvatar();
refreshUnreadIndicator();
refreshTitle();
conversationListFragment.loadChatlistAsync();
}
public void onDeleteProfile(int profileId) {
deleteProfileId = profileId;
boolean result =
ScreenLockUtil.applyScreenLock(
this,
getString(R.string.delete_account),
getString(R.string.enter_system_secret_to_continue),
deleteProfileLockLauncher);
if (!result) {
deleteProfile(profileId);
}
}
private void deleteProfile(int profileId) {
DcAccounts accounts = DcHelper.getAccounts(this);
boolean selected = profileId == accounts.getSelectedAccount().getAccountId();
DcHelper.getNotificationCenter(this).removeAllNotifications(profileId);
accounts.removeAccount(profileId);
if (selected) {
DcContext selAcc = accounts.getSelectedAccount();
if (selAcc.isOk()) {
AccountManager.getInstance().switchAccount(this, selAcc.getAccountId());
onProfileSwitched(selAcc.getAccountId());
} else {
AccountManager.getInstance().switchAccountAndStartActivity(this, 0);
}
} else {
AccountManager.getInstance().showSwitchAccountMenu(this, false);
}
// title update needed to show "Delta Chat" in case there is only one profile left
refreshTitle();
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
public void onRequestPermissionsResult(
int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults);
}
}
@@ -20,48 +20,44 @@ import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcChatlist;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcLot;
import java.lang.ref.WeakReference;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.mms.GlideRequests;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.lang.ref.WeakReference;
/**
* A CursorAdapter for building a list of conversation threads.
*
* @author Moxie Marlinspike
*/
class ConversationListAdapter extends BaseConversationListAdapter<ConversationListAdapter.ViewHolder> {
class ConversationListAdapter
extends BaseConversationListAdapter<ConversationListAdapter.ViewHolder> {
private static final int MESSAGE_TYPE_SWITCH_ARCHIVE = 1;
private static final int MESSAGE_TYPE_THREAD = 2;
private static final int MESSAGE_TYPE_INBOX_ZERO = 3;
private static final int MESSAGE_TYPE_THREAD = 2;
private static final int MESSAGE_TYPE_INBOX_ZERO = 3;
private final WeakReference<Context> context;
private @NonNull DcContext dcContext;
private @NonNull DcChatlist dcChatlist;
private final @NonNull GlideRequests glideRequests;
private final @NonNull LayoutInflater inflater;
private final @Nullable ItemClickListener clickListener;
private final WeakReference<Context> context;
private @NonNull DcContext dcContext;
private @NonNull DcChatlist dcChatlist;
private final @NonNull GlideRequests glideRequests;
private final @NonNull LayoutInflater inflater;
private final @Nullable ItemClickListener clickListener;
protected static class ViewHolder extends RecyclerView.ViewHolder {
public <V extends View & BindableConversationListItem> ViewHolder(final @NonNull V itemView)
{
public <V extends View & BindableConversationListItem> ViewHolder(final @NonNull V itemView) {
super(itemView);
}
public BindableConversationListItem getItem() {
return (BindableConversationListItem)itemView;
return (BindableConversationListItem) itemView;
}
}
@@ -75,17 +71,17 @@ class ConversationListAdapter extends BaseConversationListAdapter<ConversationLi
return dcChatlist.getChatId(i);
}
ConversationListAdapter(@NonNull Context context,
@NonNull GlideRequests glideRequests,
@Nullable ItemClickListener clickListener)
{
ConversationListAdapter(
@NonNull Context context,
@NonNull GlideRequests glideRequests,
@Nullable ItemClickListener clickListener) {
super();
this.context = new WeakReference<>(context);
this.glideRequests = glideRequests;
this.dcContext = DcHelper.getContext(context);
this.dcChatlist = new DcChatlist(0, 0);
this.inflater = LayoutInflater.from(context);
this.clickListener = clickListener;
this.context = new WeakReference<>(context);
this.glideRequests = glideRequests;
this.dcContext = DcHelper.getContext(context);
this.dcChatlist = new DcChatlist(0, 0);
this.inflater = LayoutInflater.from(context);
this.clickListener = clickListener;
setHasStableIds(true);
}
@@ -93,29 +89,37 @@ class ConversationListAdapter extends BaseConversationListAdapter<ConversationLi
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (viewType == MESSAGE_TYPE_SWITCH_ARCHIVE) {
final ConversationListItem item = (ConversationListItem)inflater.inflate(R.layout.conversation_list_item_view, parent, false);
final ConversationListItem item =
(ConversationListItem)
inflater.inflate(R.layout.conversation_list_item_view, parent, false);
item.getLayoutParams().height = ViewUtil.dpToPx(54);
item.findViewById(R.id.subject).setVisibility(View.GONE);
item.findViewById(R.id.date).setVisibility(View.GONE);
item.setOnClickListener(v -> {
if (clickListener != null) clickListener.onSwitchToArchive();
});
item.setOnClickListener(
v -> {
if (clickListener != null) clickListener.onSwitchToArchive();
});
return new ViewHolder(item);
} else if (viewType == MESSAGE_TYPE_INBOX_ZERO) {
return new ViewHolder((ConversationListItemInboxZero)inflater.inflate(R.layout.conversation_list_item_inbox_zero, parent, false));
return new ViewHolder(
(ConversationListItemInboxZero)
inflater.inflate(R.layout.conversation_list_item_inbox_zero, parent, false));
} else {
final ConversationListItem item = (ConversationListItem)inflater.inflate(R.layout.conversation_list_item_view,
parent, false);
final ConversationListItem item =
(ConversationListItem)
inflater.inflate(R.layout.conversation_list_item_view, parent, false);
item.setOnClickListener(view -> {
if (clickListener != null) clickListener.onItemClick(item);
});
item.setOnClickListener(
view -> {
if (clickListener != null) clickListener.onItemClick(item);
});
item.setOnLongClickListener(view -> {
if (clickListener != null) clickListener.onItemLongClick(item);
return true;
});
item.setOnLongClickListener(
view -> {
if (clickListener != null) clickListener.onItemLongClick(item);
return true;
});
return new ViewHolder(item);
}
@@ -130,7 +134,15 @@ class ConversationListAdapter extends BaseConversationListAdapter<ConversationLi
DcChat chat = dcContext.getChat(dcChatlist.getChatId(i));
DcLot summary = dcChatlist.getSummary(i, chat);
viewHolder.getItem().bind(DcHelper.getThreadRecord(context, summary, chat), dcChatlist.getMsgId(i), summary, glideRequests, batchSet, batchMode);
viewHolder
.getItem()
.bind(
DcHelper.getThreadRecord(context, summary, chat),
dcChatlist.getMsgId(i),
summary,
glideRequests,
batchSet,
batchMode);
}
@Override
@@ -139,7 +151,7 @@ class ConversationListAdapter extends BaseConversationListAdapter<ConversationLi
if (chatId == DcChat.DC_CHAT_ID_ARCHIVED_LINK) {
return MESSAGE_TYPE_SWITCH_ARCHIVE;
} else if(chatId == DcChat.DC_CHAT_ID_ALLDONE_HINT) {
} else if (chatId == DcChat.DC_CHAT_ID_ALLDONE_HINT) {
return MESSAGE_TYPE_INBOX_ZERO;
} else {
return MESSAGE_TYPE_THREAD;
@@ -159,7 +171,9 @@ class ConversationListAdapter extends BaseConversationListAdapter<ConversationLi
interface ItemClickListener {
void onItemClick(ConversationListItem item);
void onItemLongClick(ConversationListItem item);
void onSwitchToArchive();
}
@@ -169,7 +183,7 @@ class ConversationListAdapter extends BaseConversationListAdapter<ConversationLi
return;
}
if (chatlist == null) {
dcChatlist = new DcChatlist(0, 0);
dcChatlist = new DcChatlist(0, 0);
} else {
dcChatlist = chatlist;
dcContext = DcHelper.getContext(context);
@@ -11,20 +11,19 @@ import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import androidx.activity.OnBackPressedCallback;
import com.b44t.messenger.DcChat;
import org.thoughtcrime.securesms.connect.DcHelper;
public class ConversationListArchiveActivity extends PassphraseRequiredActionBarActivity
implements ConversationListFragment.ConversationSelectedListener
{
implements ConversationListFragment.ConversationSelectedListener {
@Override
protected void onCreate(Bundle icicle, boolean ready) {
setContentView(R.layout.activity_conversation_list_archive);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (isRelayingMessageContent(this)) {
getSupportActionBar().setTitle(isSharing(this) ? R.string.chat_share_with_title : R.string.forward_to);
getSupportActionBar()
.setTitle(isSharing(this) ? R.string.chat_share_with_title : R.string.forward_to);
getSupportActionBar().setSubtitle(R.string.chat_archived_label);
} else {
getSupportActionBar().setTitle(R.string.chat_archived_label);
@@ -33,6 +32,26 @@ public class ConversationListArchiveActivity extends PassphraseRequiredActionBar
Bundle bundle = new Bundle();
bundle.putBoolean(ConversationListFragment.ARCHIVE, true);
initFragment(R.id.fragment, new ConversationListFragment(), bundle);
getOnBackPressedDispatcher()
.addCallback(
this,
new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
if (!isRelayingMessageContent(ConversationListArchiveActivity.this)) {
// Load the ConversationListActivity in case it's not existent for some reason
Intent intent =
new Intent(
ConversationListArchiveActivity.this, ConversationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
setEnabled(false);
getOnBackPressedDispatcher().onBackPressed();
}
});
}
@Override
@@ -63,7 +82,7 @@ public class ConversationListArchiveActivity extends PassphraseRequiredActionBar
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
onBackPressed();
getOnBackPressedDispatcher().onBackPressed();
return true;
} else if (itemId == R.id.mark_as_read) {
DcHelper.getContext(this).marknoticedChat(DcChat.DC_CHAT_ID_ARCHIVED_LINK);
@@ -73,20 +92,6 @@ public class ConversationListArchiveActivity extends PassphraseRequiredActionBar
return false;
}
@Override
public void onBackPressed() {
if (isRelayingMessageContent(this)) {
// Go back to the ConversationListRelayingActivity
super.onBackPressed();
} else {
// Load the ConversationListActivity in case it's not existent for some reason
Intent intent = new Intent(this, ConversationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();
}
}
@Override
public void onCreateConversation(int chatId) {
Intent intent = new Intent(this, ConversationActivity.class);
@@ -29,16 +29,15 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.b44t.messenger.DcChatlist;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcEvent;
import com.b44t.messenger.DcMsg;
import java.util.Timer;
import java.util.TimerTask;
import org.thoughtcrime.securesms.ConversationListAdapter.ItemClickListener;
import org.thoughtcrime.securesms.components.recyclerview.DeleteItemAnimator;
import org.thoughtcrime.securesms.components.reminder.DozeReminder;
@@ -52,25 +51,21 @@ import org.thoughtcrime.securesms.util.ShareUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.Timer;
import java.util.TimerTask;
public class ConversationListFragment extends BaseConversationListFragment
implements ItemClickListener, DcEventCenter.DcEventDelegate {
implements ItemClickListener, DcEventCenter.DcEventDelegate {
public static final String ARCHIVE = "archive";
public static final String RELOAD_LIST = "reload_list";
private static final String TAG = ConversationListFragment.class.getSimpleName();
private RecyclerView list;
private View emptyState;
private TextView emptySearch;
private final String queryFilter = "";
private boolean archive;
private Timer reloadTimer;
private boolean chatlistJustLoaded;
private boolean reloadTimerInstantly;
private RecyclerView list;
private View emptyState;
private TextView emptySearch;
private final String queryFilter = "";
private boolean archive;
private Timer reloadTimer;
private boolean chatlistJustLoaded;
private boolean reloadTimerInstantly;
@Override
public void onCreate(Bundle icicle) {
@@ -103,10 +98,10 @@ public class ConversationListFragment extends BaseConversationListFragment
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle bundle) {
final View view = inflater.inflate(R.layout.conversation_list_fragment, container, false);
list = ViewUtil.findById(view, R.id.list);
fab = ViewUtil.findById(view, R.id.fab);
emptyState = ViewUtil.findById(view, R.id.empty_state);
emptySearch = ViewUtil.findById(view, R.id.empty_search);
list = ViewUtil.findById(view, R.id.list);
fab = ViewUtil.findById(view, R.id.fab);
emptyState = ViewUtil.findById(view, R.id.empty_state);
emptySearch = ViewUtil.findById(view, R.id.empty_search);
// add padding to avoid content hidden behind system bars
ViewUtil.applyWindowInsets(list, true, archive, true, true);
@@ -145,22 +140,25 @@ public class ConversationListFragment extends BaseConversationListFragment
updateReminders();
if (requireActivity().getIntent().getIntExtra(RELOAD_LIST, 0) == 1
&& !chatlistJustLoaded) {
if (requireActivity().getIntent().getIntExtra(RELOAD_LIST, 0) == 1 && !chatlistJustLoaded) {
loadChatlist();
reloadTimerInstantly = false;
}
chatlistJustLoaded = false;
reloadTimer = new Timer();
reloadTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
Util.runOnMain(() -> {
list.getAdapter().notifyDataSetChanged();
});
}
}, reloadTimerInstantly? 0 : 60 * 1000, 60 * 1000);
reloadTimer.scheduleAtFixedRate(
new TimerTask() {
@Override
public void run() {
Util.runOnMain(
() -> {
list.getAdapter().notifyDataSetChanged();
});
}
},
reloadTimerInstantly ? 0 : 60 * 1000,
60 * 1000);
}
@Override
@@ -184,7 +182,8 @@ public class ConversationListFragment extends BaseConversationListFragment
@SuppressLint({"StaticFieldLeak", "NewApi"})
private void updateReminders() {
// by the time onPostExecute() is asynchronously run, getActivity() might return null, so get the activity here:
// by the time onPostExecute() is asynchronously run, getActivity() might return null, so get
// the activity here:
Activity activity = requireActivity();
new AsyncTask<Context, Void, Void>() {
@Override
@@ -204,22 +203,29 @@ public class ConversationListFragment extends BaseConversationListFragment
@Override
protected void onPostExecute(Void result) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (!Prefs.getBooleanPreference(activity, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, false)) {
if (!Prefs.getBooleanPreference(
activity, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, false)) {
Prefs.setBooleanPreference(activity, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, true);
Permissions.with(activity)
.request(Manifest.permission.POST_NOTIFICATIONS)
.ifNecessary()
.onAllGranted(() -> {
DozeReminder.maybeAskDirectly(activity);
})
.onAnyDenied(() -> {
final DcContext dcContext = DcHelper.getContext(activity);
DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
msg.setText("\uD83D\uDC49 "+activity.getString(R.string.notifications_disabled)+" \uD83D\uDC48\n\n"
+activity.getString(R.string.perm_explain_access_to_notifications_denied));
dcContext.addDeviceMsg("android.notifications-disabled", msg);
})
.execute();
.request(Manifest.permission.POST_NOTIFICATIONS)
.ifNecessary()
.onAllGranted(
() -> {
DozeReminder.maybeAskDirectly(activity);
})
.onAnyDenied(
() -> {
final DcContext dcContext = DcHelper.getContext(activity);
DcMsg msg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
msg.setText(
"\uD83D\uDC49 "
+ activity.getString(R.string.notifications_disabled)
+ " \uD83D\uDC48\n\n"
+ activity.getString(
R.string.perm_explain_access_to_notifications_denied));
dcContext.addDeviceMsg("android.notifications-disabled", msg);
})
.execute();
} else {
DozeReminder.maybeAskDirectly(activity);
}
@@ -233,7 +239,8 @@ public class ConversationListFragment extends BaseConversationListFragment
private final Object loadChatlistLock = new Object();
private boolean inLoadChatlist;
private boolean needsAnotherLoad;
private void loadChatlistAsync() {
public void loadChatlistAsync() {
synchronized (loadChatlistLock) {
needsAnotherLoad = true;
if (inLoadChatlist) {
@@ -243,21 +250,22 @@ public class ConversationListFragment extends BaseConversationListFragment
inLoadChatlist = true;
}
Util.runOnAnyBackgroundThread(() -> {
while(true) {
synchronized (loadChatlistLock) {
if (!needsAnotherLoad) {
inLoadChatlist = false;
return;
}
needsAnotherLoad = false;
}
Util.runOnAnyBackgroundThread(
() -> {
while (true) {
synchronized (loadChatlistLock) {
if (!needsAnotherLoad) {
inLoadChatlist = false;
return;
}
needsAnotherLoad = false;
}
Log.i(TAG, "executing debounced chatlist loading");
loadChatlist();
Util.sleep(100);
}
});
Log.i(TAG, "executing debounced chatlist loading");
loadChatlist();
Util.sleep(100);
}
});
}
private void loadChatlist() {
@@ -272,32 +280,36 @@ public class ConversationListFragment extends BaseConversationListFragment
Context context = getContext();
if (context == null) {
// can't load chat list at this time, see: https://github.com/deltachat/deltachat-android/issues/2012
// can't load chat list at this time, see:
// https://github.com/deltachat/deltachat-android/issues/2012
Log.w(TAG, "Ignoring call to loadChatlist()");
return;
}
DcChatlist chatlist = DcHelper.getContext(context).getChatlist(listflags, queryFilter.isEmpty() ? null : queryFilter, 0);
DcChatlist chatlist =
DcHelper.getContext(context)
.getChatlist(listflags, queryFilter.isEmpty() ? null : queryFilter, 0);
Util.runOnMain(() -> {
if (chatlist.getCnt() <= 0 && TextUtils.isEmpty(queryFilter)) {
list.setVisibility(View.INVISIBLE);
emptyState.setVisibility(View.VISIBLE);
emptySearch.setVisibility(View.INVISIBLE);
fab.startPulse(3 * 1000);
} else if (chatlist.getCnt() <= 0 && !TextUtils.isEmpty(queryFilter)) {
list.setVisibility(View.INVISIBLE);
emptyState.setVisibility(View.GONE);
emptySearch.setVisibility(View.VISIBLE);
emptySearch.setText(getString(R.string.search_no_result_for_x, queryFilter));
} else {
list.setVisibility(View.VISIBLE);
emptyState.setVisibility(View.GONE);
emptySearch.setVisibility(View.INVISIBLE);
fab.stopPulse();
}
Util.runOnMain(
() -> {
if (chatlist.getCnt() <= 0 && TextUtils.isEmpty(queryFilter)) {
list.setVisibility(View.INVISIBLE);
emptyState.setVisibility(View.VISIBLE);
emptySearch.setVisibility(View.INVISIBLE);
fab.startPulse(3 * 1000);
} else if (chatlist.getCnt() <= 0 && !TextUtils.isEmpty(queryFilter)) {
list.setVisibility(View.INVISIBLE);
emptyState.setVisibility(View.GONE);
emptySearch.setVisibility(View.VISIBLE);
emptySearch.setText(getString(R.string.search_no_result_for_x, queryFilter));
} else {
list.setVisibility(View.VISIBLE);
emptyState.setVisibility(View.GONE);
emptySearch.setVisibility(View.INVISIBLE);
fab.stopPulse();
}
((ConversationListAdapter)list.getAdapter()).changeData(chatlist);
});
((ConversationListAdapter) list.getAdapter()).changeData(chatlist);
});
}
@Override
@@ -307,12 +319,12 @@ public class ConversationListFragment extends BaseConversationListFragment
@Override
protected void setFabVisibility(boolean isActionMode) {
fab.setVisibility((isActionMode || !archive)? View.VISIBLE : View.GONE);
fab.setVisibility((isActionMode || !archive) ? View.VISIBLE : View.GONE);
}
@Override
public void onItemClick(ConversationListItem item) {
onItemClick(item.getChatId());
onItemClick(item.getChatId());
}
@Override
@@ -322,14 +334,15 @@ public class ConversationListFragment extends BaseConversationListFragment
@Override
public void onSwitchToArchive() {
((ConversationSelectedListener)requireActivity()).onSwitchToArchive();
((ConversationSelectedListener) requireActivity()).onSwitchToArchive();
}
@Override
public void handleEvent(@NonNull DcEvent event) {
final int accId = event.getAccountId();
if (event.getId() == DcContext.DC_EVENT_CHAT_DELETED) {
DcHelper.getNotificationCenter(requireActivity()).removeNotifications(accId, event.getData1Int());
DcHelper.getNotificationCenter(requireActivity())
.removeNotifications(accId, event.getData1Int());
} else if (accId != DcHelper.getContext(requireActivity()).getAccountId()) {
Activity activity = getActivity();
if (activity instanceof ConversationListActivity) {
@@ -352,7 +365,4 @@ public class ConversationListFragment extends BaseConversationListFragment
loadChatlistAsync();
}
}
}
@@ -30,17 +30,16 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.amulyakhare.textdrawable.TextDrawable;
import com.b44t.messenger.DcChat;
import com.b44t.messenger.DcContact;
import com.b44t.messenger.DcContext;
import com.b44t.messenger.DcLot;
import com.b44t.messenger.DcMsg;
import java.util.Collections;
import java.util.Set;
import org.thoughtcrime.securesms.components.AvatarView;
import org.thoughtcrime.securesms.components.DeliveryStatusView;
import org.thoughtcrime.securesms.components.FromTextView;
@@ -53,25 +52,22 @@ import org.thoughtcrime.securesms.util.ThemeUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import java.util.Collections;
import java.util.Set;
public class ConversationListItem extends RelativeLayout
implements BindableConversationListItem, Unbindable
{
private final static Typeface BOLD_TYPEFACE = Typeface.create("sans-serif-medium", Typeface.NORMAL);
private final static Typeface LIGHT_TYPEFACE = Typeface.create("sans-serif", Typeface.NORMAL);
implements BindableConversationListItem, Unbindable {
private static final Typeface BOLD_TYPEFACE =
Typeface.create("sans-serif-medium", Typeface.NORMAL);
private static final Typeface LIGHT_TYPEFACE = Typeface.create("sans-serif", Typeface.NORMAL);
private Set<Long> selectedThreads;
private long chatId;
private int msgId;
private TextView subjectView;
private FromTextView fromView;
private TextView dateView;
private TextView archivedBadgeView;
private TextView requestBadgeView;
private Set<Long> selectedThreads;
private long chatId;
private int msgId;
private TextView subjectView;
private FromTextView fromView;
private TextView dateView;
private TextView archivedBadgeView;
private TextView requestBadgeView;
private DeliveryStatusView deliveryStatusIndicator;
private ImageView unreadIndicator;
private ImageView unreadIndicator;
private AvatarView avatar;
@@ -86,72 +82,74 @@ public class ConversationListItem extends RelativeLayout
@Override
protected void onFinishInflate() {
super.onFinishInflate();
this.subjectView = findViewById(R.id.subject);
this.fromView = findViewById(R.id.from_text);
this.dateView = findViewById(R.id.date);
this.subjectView = findViewById(R.id.subject);
this.fromView = findViewById(R.id.from_text);
this.dateView = findViewById(R.id.date);
this.deliveryStatusIndicator = new DeliveryStatusView(findViewById(R.id.delivery_indicator));
this.avatar = findViewById(R.id.avatar);
this.archivedBadgeView = findViewById(R.id.archived_badge);
this.requestBadgeView = findViewById(R.id.request_badge);
this.unreadIndicator = findViewById(R.id.unread_indicator);
this.avatar = findViewById(R.id.avatar);
this.archivedBadgeView = findViewById(R.id.archived_badge);
this.requestBadgeView = findViewById(R.id.request_badge);
this.unreadIndicator = findViewById(R.id.unread_indicator);
ViewUtil.setTextViewGravityStart(this.fromView, getContext());
ViewUtil.setTextViewGravityStart(this.subjectView, getContext());
}
@Override
public void bind(@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads,
boolean batchMode)
{
public void bind(
@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads,
boolean batchMode) {
bind(thread, msgId, dcSummary, glideRequests, selectedThreads, batchMode, null);
}
public void bind(@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads,
boolean batchMode,
@Nullable String highlightSubstring)
{
this.selectedThreads = selectedThreads;
Recipient recipient = thread.getRecipient();
this.chatId = thread.getThreadId();
this.msgId = msgId;
public void bind(
@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads,
boolean batchMode,
@Nullable String highlightSubstring) {
this.selectedThreads = selectedThreads;
Recipient recipient = thread.getRecipient();
this.chatId = thread.getThreadId();
this.msgId = msgId;
int state = dcSummary.getState();
int unreadCount = thread.getUnreadCount();
int state = dcSummary.getState();
if (highlightSubstring != null) {
this.fromView.setText(getHighlightedSpan(recipient.getName(), highlightSubstring));
} else {
this.fromView.setText(recipient, state!=DcMsg.DC_STATE_IN_FRESH);
this.fromView.setText(recipient, state != DcMsg.DC_STATE_IN_FRESH);
}
subjectView.setVisibility(chatId == DcChat.DC_CHAT_ID_ARCHIVED_LINK? GONE : VISIBLE);
subjectView.setVisibility(chatId == DcChat.DC_CHAT_ID_ARCHIVED_LINK ? GONE : VISIBLE);
this.subjectView.setText(thread.getDisplayBody());
this.subjectView.setTypeface(state==DcMsg.DC_STATE_IN_FRESH ? BOLD_TYPEFACE : LIGHT_TYPEFACE);
this.subjectView.setTextColor(state==DcMsg.DC_STATE_IN_FRESH ? ThemeUtil.getThemedColor(getContext(), R.attr.conversation_list_item_unread_color)
: ThemeUtil.getThemedColor(getContext(), R.attr.conversation_list_item_subject_color));
this.subjectView.setTypeface(state == DcMsg.DC_STATE_IN_FRESH ? BOLD_TYPEFACE : LIGHT_TYPEFACE);
this.subjectView.setTextColor(
state == DcMsg.DC_STATE_IN_FRESH
? ThemeUtil.getThemedColor(getContext(), R.attr.conversation_list_item_unread_color)
: ThemeUtil.getThemedColor(getContext(), R.attr.conversation_list_item_subject_color));
if (thread.getDate() > 0) {
CharSequence date = DateUtils.getBriefRelativeTimeSpanString(getContext(), thread.getDate());
dateView.setText(date);
}
else {
} else {
dateView.setText("");
}
dateView.setCompoundDrawablesWithIntrinsicBounds(
thread.isSendingLocations()? R.drawable.ic_location_chatlist : 0, 0,
thread.getVisibility()==DcChat.DC_CHAT_VISIBILITY_PINNED? R.drawable.ic_pinned_chatlist : 0, 0
);
thread.isSendingLocations() ? R.drawable.ic_location_chatlist : 0, 0,
thread.getVisibility() == DcChat.DC_CHAT_VISIBILITY_PINNED
? R.drawable.ic_pinned_chatlist
: 0,
0);
setStatusIcons(thread.getVisibility(), state, unreadCount, thread.isContactRequest(), thread.isMuted() || chatId == DcChat.DC_CHAT_ID_ARCHIVED_LINK);
setStatusIcons(thread, state);
setBatchState(batchMode);
setBgColor(thread);
@@ -160,22 +158,22 @@ public class ConversationListItem extends RelativeLayout
DcContact contact = recipient.getDcContact();
avatar.setSeenRecently(contact != null && contact.wasSeenRecently());
DcChat dcChat = DcHelper.getContext(getContext()).getChat((int)chatId);
DcChat dcChat = DcHelper.getContext(getContext()).getChat((int) chatId);
boolean isProtected = dcChat.isDeviceTalk() || dcChat.isSelfTalk();
fromView.setCompoundDrawablesWithIntrinsicBounds(
thread.isMuted()? R.drawable.ic_volume_off_grey600_18dp : 0,
thread.isMuted() ? R.drawable.ic_volume_off_grey600_18dp : 0,
0,
isProtected? R.drawable.ic_verified : 0,
isProtected ? R.drawable.ic_verified : 0,
0);
}
public void bind(@NonNull DcContact contact,
@NonNull GlideRequests glideRequests,
@Nullable String highlightSubstring)
{
public void bind(
@NonNull DcContact contact,
@NonNull GlideRequests glideRequests,
@Nullable String highlightSubstring) {
this.selectedThreads = Collections.emptySet();
Recipient recipient = new Recipient(getContext(), contact);
Recipient recipient = new Recipient(getContext(), contact);
fromView.setText(getHighlightedSpan(contact.getDisplayName(), highlightSubstring));
fromView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
@@ -192,14 +190,14 @@ public class ConversationListItem extends RelativeLayout
avatar.setSeenRecently(contact.wasSeenRecently());
}
public void bind(@NonNull DcMsg messageResult,
@NonNull GlideRequests glideRequests,
@Nullable String highlightSubstring)
{
public void bind(
@NonNull DcMsg messageResult,
@NonNull GlideRequests glideRequests,
@Nullable String highlightSubstring) {
DcContext dcContext = DcHelper.getContext(getContext());
DcContact sender = dcContext.getContact(messageResult.getFromId());
this.selectedThreads = Collections.emptySet();
Recipient recipient = new Recipient(getContext(), sender);
Recipient recipient = new Recipient(getContext(), sender);
fromView.setText(recipient, true);
fromView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
@@ -207,10 +205,10 @@ public class ConversationListItem extends RelativeLayout
subjectView.setText(getHighlightedSpan(messageResult.getSummarytext(512), highlightSubstring));
long timestamp = messageResult.getTimestamp();
if(timestamp>0) {
dateView.setText(DateUtils.getBriefRelativeTimeSpanString(getContext(), messageResult.getTimestamp()));
}
else {
if (timestamp > 0) {
dateView.setText(
DateUtils.getBriefRelativeTimeSpanString(getContext(), messageResult.getTimestamp()));
} else {
dateView.setText("");
}
dateView.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
@@ -225,8 +223,7 @@ public class ConversationListItem extends RelativeLayout
}
@Override
public void unbind() {
}
public void unbind() {}
private void setBatchState(boolean batch) {
setSelected(batch && selectedThreads.contains(chatId));
@@ -240,81 +237,81 @@ public class ConversationListItem extends RelativeLayout
return msgId;
}
private void setStatusIcons(int visibility, int state, int unreadCount, boolean isContactRequest, boolean isMuted) {
if (visibility==DcChat.DC_CHAT_VISIBILITY_ARCHIVED)
{
private void setStatusIcons(ThreadRecord thread, int state) {
if (thread.getVisibility() == DcChat.DC_CHAT_VISIBILITY_ARCHIVED) {
archivedBadgeView.setVisibility(View.VISIBLE);
requestBadgeView.setVisibility(isContactRequest ? View.VISIBLE : View.GONE);
requestBadgeView.setVisibility(thread.isContactRequest() ? View.VISIBLE : View.GONE);
deliveryStatusIndicator.setNone();
}
else if (isContactRequest) {
} else if (thread.isContactRequest()) {
requestBadgeView.setVisibility(View.VISIBLE);
archivedBadgeView.setVisibility(View.GONE);
deliveryStatusIndicator.setNone();
}
else
{
} else {
requestBadgeView.setVisibility(View.GONE);
archivedBadgeView.setVisibility(View.GONE);
if (state == DcMsg.DC_STATE_OUT_FAILED) {
deliveryStatusIndicator.setFailed();
} else if (state == DcMsg.DC_STATE_OUT_MDN_RCVD) {
deliveryStatusIndicator.setRead();
} else if (state == DcMsg.DC_STATE_OUT_DELIVERED) {
deliveryStatusIndicator.setSent();
} else if (state == DcMsg.DC_STATE_OUT_PREPARING) {
deliveryStatusIndicator.setPreparing();
} else if (state == DcMsg.DC_STATE_OUT_PENDING) {
deliveryStatusIndicator.setPending();
} else if (thread.isOutChannel()) {
deliveryStatusIndicator.setNone();
} else if (state == DcMsg.DC_STATE_OUT_MDN_RCVD) {
deliveryStatusIndicator.setRead();
} else if (state == DcMsg.DC_STATE_OUT_DELIVERED) {
deliveryStatusIndicator.setSent();
} else {
deliveryStatusIndicator.setNone();
}
if (state == DcMsg.DC_STATE_OUT_FAILED) {
deliveryStatusIndicator.setTint(Color.RED);
} else {
deliveryStatusIndicator.resetTint();
}
}
if(unreadCount==0 || isContactRequest) {
int unreadCount = thread.getUnreadCount();
if (unreadCount == 0 || thread.isContactRequest()) {
unreadIndicator.setVisibility(View.GONE);
} else {
final int color;
if(isMuted){
color = getResources().getColor(ThemeUtil.isDarkTheme(getContext()) ? R.color.unread_count_muted_dark : R.color.unread_count_muted);
if (thread.isMuted() || chatId == DcChat.DC_CHAT_ID_ARCHIVED_LINK) {
color =
getResources()
.getColor(
ThemeUtil.isDarkTheme(getContext())
? R.color.unread_count_muted_dark
: R.color.unread_count_muted);
} else {
final TypedArray attrs = getContext().obtainStyledAttributes(new int[] {
R.attr.conversation_list_item_unreadcount_color,
});
final TypedArray attrs =
getContext()
.obtainStyledAttributes(
new int[] {
R.attr.conversation_list_item_unreadcount_color,
});
color = attrs.getColor(0, Color.BLACK);
}
unreadIndicator.setImageDrawable(TextDrawable.builder()
.beginConfig()
.width(ViewUtil.dpToPx(getContext(), 24))
.height(ViewUtil.dpToPx(getContext(), 24))
.textColor(Color.WHITE)
.bold()
.endConfig()
.buildRound(String.valueOf(unreadCount), color));
unreadIndicator.setImageDrawable(
TextDrawable.builder()
.beginConfig()
.width(ViewUtil.dpToPx(getContext(), 24))
.height(ViewUtil.dpToPx(getContext(), 24))
.textColor(Color.WHITE)
.bold()
.endConfig()
.buildRound(String.valueOf(unreadCount), color));
unreadIndicator.setVisibility(View.VISIBLE);
}
}
private void setBgColor(ThreadRecord thread) {
int bg = R.attr.conversation_list_item_background;
if (thread!=null && thread.getVisibility()==DcChat.DC_CHAT_VISIBILITY_PINNED) {
bg = R.attr.pinned_list_item_background;
if (thread != null && thread.getVisibility() == DcChat.DC_CHAT_VISIBILITY_PINNED) {
bg = R.attr.pinned_list_item_background;
}
try (TypedArray ta = getContext().obtainStyledAttributes(new int[]{bg})) {
try (TypedArray ta = getContext().obtainStyledAttributes(new int[] {bg})) {
ViewUtil.setBackground(this, ta.getDrawable(0));
}
}
private Spanned getHighlightedSpan(@Nullable String value,
@Nullable String highlight)
{
private Spanned getHighlightedSpan(@Nullable String value, @Nullable String highlight) {
if (TextUtils.isEmpty(value)) {
return new SpannableString("");
}
@@ -325,11 +322,11 @@ public class ConversationListItem extends RelativeLayout
return new SpannableString(value);
}
String normalizedValue = value.toLowerCase(Util.getLocale());
String normalizedTest = highlight.toLowerCase(Util.getLocale());
String normalizedValue = value.toLowerCase(Util.getLocale());
String normalizedTest = highlight.toLowerCase(Util.getLocale());
Spannable spanned = new SpannableString(value);
int searchStartIndex = 0;
Spannable spanned = new SpannableString(value);
int searchStartIndex = 0;
for (String token : normalizedTest.split(" ")) {
if (token.trim().isEmpty()) continue;
@@ -341,7 +338,8 @@ public class ConversationListItem extends RelativeLayout
if (start >= 0) {
int end = Math.min(start + token.length(), spanned.length());
spanned.setSpan(new StyleSpan(Typeface.BOLD), start, end, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
spanned.setSpan(
new StyleSpan(Typeface.BOLD), start, end, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
searchStartIndex = end;
}
}
@@ -1,21 +1,17 @@
package org.thoughtcrime.securesms;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.b44t.messenger.DcLot;
import java.util.Set;
import org.thoughtcrime.securesms.database.model.ThreadRecord;
import org.thoughtcrime.securesms.mms.GlideRequests;
import java.util.Set;
public class ConversationListItemInboxZero extends LinearLayout implements BindableConversationListItem{
public class ConversationListItemInboxZero extends LinearLayout
implements BindableConversationListItem {
public ConversationListItemInboxZero(Context context) {
super(context);
}
@@ -24,21 +20,25 @@ public class ConversationListItemInboxZero extends LinearLayout implements Binda
super(context, attrs);
}
public ConversationListItemInboxZero(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
public ConversationListItemInboxZero(
Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public ConversationListItemInboxZero(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
public ConversationListItemInboxZero(
Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void unbind() {
}
public void unbind() {}
@Override
public void bind(@NonNull ThreadRecord thread, int msgId, @NonNull DcLot dcSummary, @NonNull GlideRequests glideRequests, @NonNull Set<Long> selectedThreads, boolean batchMode) {
}
public void bind(
@NonNull ThreadRecord thread,
int msgId,
@NonNull DcLot dcSummary,
@NonNull GlideRequests glideRequests,
@NonNull Set<Long> selectedThreads,
boolean batchMode) {}
}
@@ -4,27 +4,24 @@ import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import java.lang.ref.WeakReference;
/**
* "Relaying" means "Forwarding or Sharing".
*
* When forwarding or sharing, we show the ConversationListActivity to the user.
* However, ConversationListActivity has `launchMode="singleTask"`, which means that this will
* destroy the existing ConversationListActivity.
* <p>When forwarding or sharing, we show the ConversationListActivity to the user. However,
* ConversationListActivity has `launchMode="singleTask"`, which means that this will destroy the
* existing ConversationListActivity.
*
* In API 20-29, `startActivityForResult()` could be used instead of `startActivity()`
* to override this behavior and get two instances of ConversationListActivity.
* <p>In API 20-29, `startActivityForResult()` could be used instead of `startActivity()` to
* override this behavior and get two instances of ConversationListActivity.
*
* As this is not possible anymore starting with API 30, we needed another solution, and created
* <p>As this is not possible anymore starting with API 30, we needed another solution, and created
* this activity here.
*
* See https://github.com/deltachat/deltachat-android/issues/1704.
* <p>See https://github.com/deltachat/deltachat-android/issues/1704.
*/
public class ConversationListRelayingActivity extends ConversationListActivity {
static WeakReference<ConversationListRelayingActivity> INSTANCE = null;
@@ -42,7 +39,8 @@ public class ConversationListRelayingActivity extends ConversationListActivity {
// =================== Static Methods ===================
public static void start(Fragment fragment, Intent intent) {
intent.setComponent(new ComponentName(fragment.getContext(), ConversationListRelayingActivity.class));
intent.setComponent(
new ComponentName(fragment.getContext(), ConversationListRelayingActivity.class));
fragment.startActivity(intent);
}
@@ -4,30 +4,32 @@ import android.animation.ValueAnimator;
import android.content.res.Resources;
import android.view.View;
import android.view.animation.Interpolator;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.thoughtcrime.securesms.util.Util;
final class ConversationSwipeAnimationHelper {
static final float TRIGGER_DX = dpToPx(64);
static final float MAX_DX = dpToPx(96);
static final float MAX_DX = dpToPx(96);
private static final float REPLY_SCALE_OVERSHOOT = 1.8f;
private static final float REPLY_SCALE_MAX = 1.2f;
private static final float REPLY_SCALE_MIN = 1f;
private static final long REPLY_SCALE_OVERSHOOT_DURATION = 200;
private static final float REPLY_SCALE_OVERSHOOT = 1.8f;
private static final float REPLY_SCALE_MAX = 1.2f;
private static final float REPLY_SCALE_MIN = 1f;
private static final long REPLY_SCALE_OVERSHOOT_DURATION = 200;
private static final Interpolator BUBBLE_INTERPOLATOR = new BubblePositionInterpolator(0f, TRIGGER_DX, MAX_DX);
private static final Interpolator REPLY_ALPHA_INTERPOLATOR = new ClampingLinearInterpolator(0f, 1f, 1f);
private static final Interpolator REPLY_TRANSITION_INTERPOLATOR = new ClampingLinearInterpolator(0f, dpToPx(10));
private static final Interpolator AVATAR_INTERPOLATOR = new ClampingLinearInterpolator(0f, dpToPx(8));
private static final Interpolator REPLY_SCALE_INTERPOLATOR = new ClampingLinearInterpolator(REPLY_SCALE_MIN, REPLY_SCALE_MAX);
private static final Interpolator BUBBLE_INTERPOLATOR =
new BubblePositionInterpolator(0f, TRIGGER_DX, MAX_DX);
private static final Interpolator REPLY_ALPHA_INTERPOLATOR =
new ClampingLinearInterpolator(0f, 1f, 1f);
private static final Interpolator REPLY_TRANSITION_INTERPOLATOR =
new ClampingLinearInterpolator(0f, dpToPx(10));
private static final Interpolator AVATAR_INTERPOLATOR =
new ClampingLinearInterpolator(0f, dpToPx(8));
private static final Interpolator REPLY_SCALE_INTERPOLATOR =
new ClampingLinearInterpolator(REPLY_SCALE_MIN, REPLY_SCALE_MAX);
private ConversationSwipeAnimationHelper() {
}
private ConversationSwipeAnimationHelper() {}
public static void update(@NonNull ConversationItem conversationItem, float dx, float sign) {
float progress = dx / TRIGGER_DX;
@@ -46,11 +48,13 @@ final class ConversationSwipeAnimationHelper {
bodyBubble.setTranslationX(BUBBLE_INTERPOLATOR.getInterpolation(dx) * sign);
}
private static void updateReactionsTransition(@NonNull View reactionsContainer, float dx, float sign) {
private static void updateReactionsTransition(
@NonNull View reactionsContainer, float dx, float sign) {
reactionsContainer.setTranslationX(BUBBLE_INTERPOLATOR.getInterpolation(dx) * sign);
}
private static void updateReplyIconTransition(@NonNull View replyIcon, float dx, float progress, float sign) {
private static void updateReplyIconTransition(
@NonNull View replyIcon, float dx, float progress, float sign) {
if (progress > 0.05f) {
replyIcon.setAlpha(REPLY_ALPHA_INTERPOLATOR.getInterpolation(progress));
} else replyIcon.setAlpha(0f);
@@ -64,21 +68,21 @@ final class ConversationSwipeAnimationHelper {
}
}
private static void updateContactPhotoHolderTransition(@Nullable View contactPhotoHolder,
float progress,
float sign)
{
private static void updateContactPhotoHolderTransition(
@Nullable View contactPhotoHolder, float progress, float sign) {
if (contactPhotoHolder == null) return;
contactPhotoHolder.setTranslationX(AVATAR_INTERPOLATOR.getInterpolation(progress) * sign);
}
private static void triggerReplyIcon(@NonNull View replyIcon) {
ValueAnimator animator = ValueAnimator.ofFloat(REPLY_SCALE_MAX, REPLY_SCALE_OVERSHOOT, REPLY_SCALE_MAX);
ValueAnimator animator =
ValueAnimator.ofFloat(REPLY_SCALE_MAX, REPLY_SCALE_OVERSHOOT, REPLY_SCALE_MAX);
animator.setDuration(REPLY_SCALE_OVERSHOOT_DURATION);
animator.addUpdateListener(animation -> {
replyIcon.setScaleX((float) animation.getAnimatedValue());
replyIcon.setScaleY((float) animation.getAnimatedValue());
});
animator.addUpdateListener(
animation -> {
replyIcon.setScaleX((float) animation.getAnimatedValue());
replyIcon.setScaleY((float) animation.getAnimatedValue());
});
animator.start();
}
@@ -93,9 +97,9 @@ final class ConversationSwipeAnimationHelper {
private final float end;
private BubblePositionInterpolator(float start, float middle, float end) {
this.start = start;
this.start = start;
this.middle = middle;
this.end = end;
this.end = end;
}
@Override
@@ -105,11 +109,11 @@ final class ConversationSwipeAnimationHelper {
} else if (input < middle) {
return input;
} else {
float segmentLength = end - middle;
float segmentTraveled = input - middle;
float segmentLength = end - middle;
float segmentTraveled = input - middle;
float segmentCompletion = segmentTraveled / segmentLength;
float scaleDownFactor = middle / (input * 2);
float output = middle + (segmentLength * segmentCompletion * scaleDownFactor);
float scaleDownFactor = middle / (input * 2);
float output = middle + (segmentLength * segmentCompletion * scaleDownFactor);
return Math.min(output, end);
}
@@ -128,10 +132,10 @@ final class ConversationSwipeAnimationHelper {
}
ClampingLinearInterpolator(float start, float end, float scale) {
slope = (end - start) * scale;
slope = (end - start) * scale;
yIntercept = start;
max = Math.max(start, end);
min = Math.min(start, end);
max = Math.max(start, end);
min = Math.min(start, end);
}
@Override
@@ -139,5 +143,4 @@ final class ConversationSwipeAnimationHelper {
return Util.clamp(slope * input + yIntercept, min, max);
}
}
}

Some files were not shown because too many files have changed in this diff Show More