Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Delta Chat Android Changelog

## Unreleased
* Make it possible to invite members into a channel via a QR code,
and make channels more secure

## v2.22.0
2025-10

Expand Down
2 changes: 1 addition & 1 deletion jni/deltachat-core-rust
Submodule deltachat-core-rust updated 91 files
+4 −0 .github/dependabot.yml
+1 −1 .github/workflows/zizmor-scan.yml
+1 −0 .gitignore
+0 −1 Cargo.lock
+5 −1 Cargo.toml
+199 −0 benches/benchmark_decrypting.rs
+13 −19 deltachat-ffi/deltachat.h
+18 −49 deltachat-ffi/src/lib.rs
+6 −0 deltachat-ffi/src/lot.rs
+6 −27 deltachat-jsonrpc/src/api.rs
+0 −26 deltachat-jsonrpc/src/api/types/chat.rs
+0 −2 deltachat-jsonrpc/src/api/types/chat_list.rs
+0 −2 deltachat-jsonrpc/src/api/types/message.rs
+39 −0 deltachat-jsonrpc/src/api/types/qr.rs
+5 −25 deltachat-repl/src/cmdline.rs
+3 −7 deltachat-rpc-client/src/deltachat_rpc_client/account.py
+11 −0 deltachat-rpc-client/src/deltachat_rpc_client/message.py
+156 −32 deltachat-rpc-client/tests/test_securejoin.py
+102 −30 deltachat-rpc-client/tests/test_something.py
+13 −1 deltachat-rpc-client/tests/test_vcard.py
+1 −3 python/src/deltachat/account.py
+0 −7 python/src/deltachat/chat.py
+0 −14 python/src/deltachat/testplugin.py
+8 −23 python/tests/test_0_complex_or_slow.py
+5 −5 python/tests/test_1_online.py
+2 −3 python/tests/test_3_offline.py
+19 −1 spec.md
+267 −421 src/chat.rs
+660 −214 src/chat/chat_tests.rs
+12 −32 src/chatlist.rs
+0 −6 src/config.rs
+1 −3 src/configure.rs
+1 −1 src/constants.rs
+1 −3 src/contact.rs
+1 −4 src/contact/contact_tests.rs
+5 −20 src/context.rs
+2 −5 src/context/context_tests.rs
+4 −2 src/decrypt.rs
+21 −0 src/e2ee.rs
+3 −4 src/ephemeral/ephemeral_tests.rs
+18 −33 src/events/chatlist_events.rs
+6 −0 src/headerdef.rs
+1 −1 src/imex/key_transfer.rs
+42 −0 src/internals_for_benchmarks.rs
+6 −0 src/lib.rs
+122 −43 src/mimefactory.rs
+8 −17 src/mimefactory/mimefactory_tests.rs
+22 −1 src/mimeparser.rs
+0 −33 src/mimeparser/mimeparser_tests.rs
+10 −29 src/oauth2.rs
+28 −4 src/param.rs
+3 −5 src/peer_channels.rs
+248 −18 src/pgp.rs
+16 −139 src/provider.rs
+71 −27 src/qr.rs
+4 −4 src/qr/qr_tests.rs
+187 −174 src/receive_imf.rs
+40 −55 src/receive_imf/receive_imf_tests.rs
+113 −83 src/securejoin.rs
+85 −61 src/securejoin/bob.rs
+36 −5 src/securejoin/qrinvite.rs
+196 −31 src/securejoin/securejoin_tests.rs
+24 −2 src/sql/migrations.rs
+5 −2 src/sql/migrations/migrations_tests.rs
+1 −28 src/stock_str.rs
+26 −13 src/sync.rs
+130 −25 src/test_utils.rs
+13 −28 src/tests/aeap.rs
+77 −123 src/tests/verified_chats.rs
+4 −20 src/token.rs
+24 −0 src/tools.rs
+2 −2 src/webxdc/maps_integration.rs
+37 −43 src/webxdc/webxdc_tests.rs
+6 −6 test-data/golden/chat_test_parallel_member_remove
+8 −8 test-data/golden/receive_imf_delayed_removal_is_ignored
+3 −3 test-data/golden/receive_imf_older_message_from_2nd_device
+6 −0 test-data/golden/test_broadcast_joining_golden_alice
+6 −0 test-data/golden/test_broadcast_joining_golden_bob
+4 −0 test-data/golden/test_broadcast_joining_golden_private_chat
+3 −3 test-data/golden/test_old_message_5
+3 −3 test-data/golden/test_outgoing_encrypted_msg
+2 −2 test-data/golden/test_outgoing_mua_msg
+4 −4 test-data/golden/test_outgoing_mua_msg_pgp
+7 −0 test-data/golden/test_sync_broadcast_alice1
+7 −0 test-data/golden/test_sync_broadcast_alice2
+8 −0 test-data/golden/test_sync_broadcast_bob
+5 −5 test-data/golden/two_group_securejoins
+7 −7 test-data/golden/verified_chats_editor_reordering
+87 −0 test-data/message/text_from_alice_encrypted.eml
+56 −0 test-data/message/text_symmetrically_encrypted.eml
+106 −82 test-data/message/verification-gossip-also-sent-to-from.eml
1 change: 1 addition & 0 deletions src/main/java/com/b44t/messenger/DcContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class DcContext {

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,10 @@ else if (!body.isEmpty()){

if (doSend) {
if (dcContext.sendMsg(dcChat.getId(), msg) == 0) {
Util.runOnMain(()-> Toast.makeText(ConversationActivity.this, dcContext.getLastError(), Toast.LENGTH_LONG).show());
String lastError = dcContext.getLastError();
if (!"".equals(lastError)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is so that we don't show an empty toast when sending a message into a legacy channel fails.

Util.runOnMain(() -> Toast.makeText(ConversationActivity.this, lastError, Toast.LENGTH_LONG).show());
}
future.set(chatId);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean onCreateOptionsMenu(Menu menu) {

if (chatId != 0) {
DcChat dcChat = dcContext.getChat(chatId);
menu.findItem(R.id.menu_clone).setVisible(chatIsMultiUser && !chatIsInBroadcast && !chatIsMailingList);
menu.findItem(R.id.menu_clone).setVisible(chatIsMultiUser && !chatIsInBroadcast && !chatIsOutBroadcast && !chatIsMailingList);
if (chatIsDeviceTalk) {
menu.findItem(R.id.edit_name).setVisible(false);
menu.findItem(R.id.show_encr_info).setVisible(false);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/thoughtcrime/securesms/ProfileAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ public void changeData(@Nullable int[] memberList, @Nullable DcContact dcContact
itemData.add(new ItemData(ITEM_DIVIDER, null, 0));
if (dcChat != null) {
if (dcChat.canSend() && dcChat.isEncrypted()) {
itemData.add(new ItemData(ITEM_MEMBERS, DcContact.DC_CONTACT_ID_ADD_MEMBER, 0));
if (!isOutBroadcast) {
itemData.add(new ItemData(ITEM_MEMBERS, DcContact.DC_CONTACT_ID_QR_INVITE, 0));
itemData.add(new ItemData(ITEM_MEMBERS, DcContact.DC_CONTACT_ID_ADD_MEMBER, 0));
}
itemData.add(new ItemData(ITEM_MEMBERS, DcContact.DC_CONTACT_ID_QR_INVITE, 0));
}
}
for (int value : memberList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void handleQrData(String rawString) {
switch (qrParsed.getState()) {
case DcContext.DC_QR_ASK_VERIFYCONTACT:
case DcContext.DC_QR_ASK_VERIFYGROUP:
case DcContext.DC_QR_ASK_JOIN_BROADCAST:
showVerifyContactOrGroup(activity, builder, rawString, qrParsed, name);
break;

Expand Down Expand Up @@ -225,6 +226,9 @@ private void showVerifyContactOrGroup(Activity activity, AlertDialog.Builder bui
case DcContext.DC_QR_ASK_VERIFYGROUP:
msg = activity.getString(R.string.qrscan_ask_join_group, qrParsed.getText1());
break;
case DcContext.DC_QR_ASK_JOIN_BROADCAST:
msg = activity.getString(R.string.qrscan_ask_join_channel, qrParsed.getText1());
break;
default:
msg = activity.getString(R.string.ask_start_chat_with, name);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public SelectedContactsAdapter(@NonNull Context context,

public void changeData(Collection<Integer> contactIds) {
contacts.clear();
contacts.add(DC_CONTACT_ID_ADD_MEMBER);
if (!isBroadcast) {
contacts.add(DC_CONTACT_ID_ADD_MEMBER);
}
if (contactIds != null) {
for (int id : contactIds) {
if (id != DC_CONTACT_ID_SELF) {
Expand All @@ -75,7 +77,7 @@ public void remove(@NonNull Integer contactId) {
}

public Set<Integer> getContacts() {
final Set<Integer> set = new HashSet<>(contacts.size()-1);
final Set<Integer> set = new HashSet<>(contacts.size());
for (int i = 1; i < contacts.size(); i++) {
set.add(contacts.get(i));
}
Expand Down
1 change: 1 addition & 0 deletions src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@
<string name="qrscan_hint_desktop">Move the QR code to the camera</string>
<string name="qrscan_failed">QR code could not be decoded</string>
<string name="qrscan_ask_join_group">Do you want to join the group \"%1$s\"?</string>
<string name="qrscan_ask_join_channel">Do you want to join the channel \"%1$s\"?</string>
<string name="qrscan_fingerprint_mismatch">The scanned fingerprint does not match the last seen for %1$s.</string>
<string name="qrscan_no_addr_found">This QR code contains a fingerprint but no address.\n\nFor an out-of-band-verification, please establish an encrypted connection to the recipient first.</string>
<string name="qrscan_contains_text">Scanned QR code text:\n\n%1$s</string>
Expand Down
Loading