Commit Graph

9467 Commits

Author SHA1 Message Date
Hocuri
3a8a6f6949 Revert small superflous change 2025-09-09 19:59:17 +02:00
Hocuri
557702ea74 Remove outdated TODO
For `vb-member-added`:
- On Bob's second device, observe_securejoin_on_other_device() isn't
  even called, because the message is incoming, not outgoing
- On Alice's second device, Bob is added as a result of the
  `vb-request-with-auth` message, so, it's not necessary to add Bob as a
  result of the outgoing `vb-member-added` message
2025-09-09 19:57:05 +02:00
Hocuri
fc52c8de05 Merge remote-tracking branch 'origin/main' into hoc/channels-encryption-only-qrcodes 2025-09-09 19:34:37 +02:00
Hocuri
4c068e835b test: fix test_sync_broadcast() 2025-09-09 19:15:36 +02:00
iequidoo
b9ff40c6b5 test: Message is OutFailed if all keys are missing (#6849)
Follow-up to 143ba6d5e7 before which a message remained in
`OutPending` indefinitely in such a case.
2025-09-09 09:48:12 -03:00
iequidoo
0684810d38 refactor: prepare_msg_raw(): don't return MsgId
The function takes `&mut Message` and updates its `id` and `chat_id` before return.
2025-09-09 09:48:12 -03:00
Hocuri
18c84e838c Merge remote-tracking branch 'origin/main' into hoc/channels-encryption-only-qrcodes 2025-09-09 10:17:59 +02:00
Hocuri
1cc7ce6e27 api: Put the chattype into the SecurejoinInviterProgress event (#7181)
Quoting @adbenitez:

> I have been using the SecurejoinInviterProgress event to show a
welcome message when user scan the QR/link of the bot (== starts a chat
with the bot)

> but this have a big problem: in that event all you know is that a
contact completed the secure-join process, you don't know if it was via
certain 1:1 invite link or a group invitation, then a group-invite bot
would send you a help message in 1:1 every time you join a group with it

Since it's easy enough to add this information to the
SecurejoinInviterProgress event, I wrote a PR to do so.
2025-09-09 08:17:53 +00:00
link2xt
82bc1bf0b1 refactor: use recv_msg_trash() instead of recv_msg_opt() 2025-09-09 06:08:15 +00:00
link2xt
75bcf8660b chore(release): prepare for 2.13.0 v2.13.0 2025-09-09 05:46:13 +00:00
dependabot[bot]
5e1d945198 chore(deps): bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 02:11:35 +00:00
dependabot[bot]
e047184ede chore(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09 02:11:26 +00:00
Hocuri
f8a46fe3cf test(python): Extend test_qr_securejoin_broadcast and make it less flaky 2025-09-08 22:29:04 +02:00
link2xt
307a2eb6ec feat: withdraw all QR codes when one is withdrawn
This is a preparation for expiring authentication tokens.

If we make authentication token expire,
we need to generate new authentication tokens each time
QR code screen is opened in the UI,
so authentication token is fresh.
We however don't want to completely invalidate
old authentication codes at the same time,
e.g. they should still be valid for joining groups,
just not result in a verification on the inviter side.

Since a group now can have a lot of authentication tokens,
it is easy to lose track of them
without any way to remove them
as they are not displayed anywhere in the UI.
As a solution, we now remove all
tokens corresponding to a group ID
when one token is withdrawn,
or all non-group tokens
when a single non-group token is withdrawn.

"Reset QR code" option already present
in the UI which works by resetting
current QR code will work without any UI changes,
but will now result in invalidation
of all previously created QR codes and invite links.
2025-09-08 17:51:45 +00:00
bjoern
ab8aedf06e refine call states (#7179)
- sync declined calls from callee to caller, as usual in all larger
messengers
- introduce the call states "Missed call", "Declined call" and
"Cancelled all" ("Ended call" is gone)
- allow calling end_call()/accept_call() for already ended/accepted
calls, in practise, handling all cornercases is tricky in UI - and the
state needs anyways to be tracked.
- track and show the call duration

the duration calculation depends on local time, but it is displayed only
coarse and is not needed for any state. this can be improved as needed,
timestamps of the corresponding messages are probably better at some
point. or ending device sends its view of the time around. but for the
first throw, it seems good enough

if we finally want that set of states, it can be exposed to a json-info
in a subsequent call, so that the UI can render it more nicely. fallback
strings as follows will stay for now to make adaption in other UI easy,
and for debugging:

<img width="320" alt="IMG_0154"
src="https://github.com/user-attachments/assets/09a89bfb-66f4-4184-b05c-e8040b96cf44"
/>

successor of https://github.com/chatmail/core/pull/6650
2025-09-08 15:48:35 +02:00
Hocuri
302059cd63 clippy 2025-09-05 22:25:39 +02:00
Hocuri
ae4b0fdb4e Adapt golden tests to the fact that 'Messages are end-to-end encrypted.' is always added now 2025-09-05 22:21:43 +02:00
Hocuri
b5a54aa6cf fix: Scaleup contact on securejoin, send more events, use correct create_blocked 2025-09-05 21:52:25 +02:00
Hocuri
01d9acbf6a test_qr_securejoin_broadcast(): Test a few more things 2025-09-05 21:52:25 +02:00
Hocuri
60e4899b3a test: Add python test test_qr_securejoin_broadcast, and fix some small bugs I found on the way 2025-09-05 21:52:25 +02:00
Hocuri
8eb5fc528f Adapt to things that changed when I rebased 2025-09-05 21:52:25 +02:00
Hocuri
286f913f6e refactor: No need for observe_securejoin_on_other_device() for securejoin v2 2025-09-05 21:52:25 +02:00
Hocuri
6e68eb1c5d Resolve identity-misbinding TODO 2025-09-05 21:52:25 +02:00
Hocuri
153ced7141 Remove outdated TODO 2025-09-05 21:52:25 +02:00
Hocuri
4a9af2b600 refactor: Remove superflous check for ChatGroupMemberAdded 2025-09-05 21:52:25 +02:00
Hocuri
0c25646ac2 test: Add golden test for Alice's side, too, in test_sync_broadcast 2025-09-05 21:52:25 +02:00
Hocuri
019da70c8a test: When a golden test fails, print some extra info 2025-09-05 21:52:19 +02:00
bjoern
b6ab13f1de feat: hide call status change messages (#7175)
this PR uses the initial "call messages" (that has a separate viewtype
since #7174) to show all call status.

this is what most other messengers are doing as well. additional "info
messages" after a call are no longer needed.

on the wire, as we cannot pickpack on visible info messages, we use
hidden messages, similar to eg. webxdc status updates.

in future PR, it is planned to allow getting call state as a json, so
that UI can render nicely. it is then decided if we want to translate
the strings in the core.

<img width="320" alt="IMG_0150"
src="https://github.com/user-attachments/assets/41ee3fa3-8be4-42c3-8dd9-d20f49881650"
/>

successor of https://github.com/chatmail/core/pull/6650
2025-09-05 08:52:15 +02:00
link2xt
53a3e51920 feat: support receiving Autocrypt-Gossip with _verified attribute
This commit is a preparation for
sending Autocrypt-Gossip with `_verified` attribute
instead of `Chat-Verified` header.
2025-09-04 19:46:14 +00:00
link2xt
4033566b4a refactor: remove Aheader::new 2025-09-04 19:46:14 +00:00
bjoern
bed1623dcb feat: use dedicated 'call' viewtype (#7174)
a dedicated viewtype allows the UI to show a more advanced UI, but even
when using the defaults,
it has the advantage that incoming/outgoing and the date are directly
visible.

successor of https://github.com/chatmail/core/pull/6650
2025-09-04 16:51:51 +02:00
link2xt
d4704977bc api!: remove e2ee_enabled preference
The setting is already removed from the UIs,
but users who had it disabled previously have
no way to enable it. After this change
encryption is effectively always preferred.
2025-09-04 13:58:05 +00:00
link2xt
838eed94bc chore: update provider database 2025-09-04 13:58:05 +00:00
link2xt
9870725d1f refactor: remove unused EncryptPreference::Reset 2025-09-04 13:58:05 +00:00
link2xt
ba827283be docs(STYLE.md): prefer BTreeMap and BTreeSet over hash variants 2025-09-04 12:26:50 +00:00
dependabot[bot]
1e37cb8c3c chore(cargo): bump nu-ansi-term from 0.46.0 to 0.50.1
Bumps [nu-ansi-term](https://github.com/nushell/nu-ansi-term) from 0.46.0 to 0.50.1.
- [Release notes](https://github.com/nushell/nu-ansi-term/releases)
- [Changelog](https://github.com/nushell/nu-ansi-term/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nushell/nu-ansi-term/compare/v0.46.0...v0.50.1)

---
updated-dependencies:
- dependency-name: nu-ansi-term
  dependency-version: 0.50.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-03 13:17:03 -03:00
Hocuri
19159c905f test: Rename alice0, alice1 to alice1, alice2 in test_sync_muted()
This makes the automatically generated "alice, alice2" context names
correct
2025-09-03 17:56:15 +02:00
Hocuri
51a36d23a2 small refactoring 2025-09-03 17:56:14 +02:00
Hocuri
f7844e97c2 fix: Don't show wrong system message on Bob's second device
Before this, Bob's second device showed a system message
"⚠️ It seems you are using Delta Chat on multiple devices that cannot
decrypt each other's outgoing messages..."
2025-09-03 17:56:14 +02:00
Hocuri
a3d1e3bc89 Remove TODO 2025-09-03 17:56:14 +02:00
Hocuri
dc5237f530 fix: Remove panic!() call 2025-09-03 17:56:14 +02:00
Hocuri
f66f6f3e92 refactor: Rename to symm_encrypt_message() 2025-09-03 17:56:14 +02:00
Hocuri
9b49386bc8 fix: Protect against DOS attacks via a message with many esks using expensive-to-compute s2k algos 2025-09-03 17:56:14 +02:00
Hocuri
40f4eea049 feat: Sync Alice's verification on Bob's side 2025-09-03 17:56:14 +02:00
Hocuri
00ba559562 Resolve some small TODOs 2025-09-03 17:56:14 +02:00
Hocuri
3a648698ee resolve some small TODOs 2025-09-03 17:56:14 +02:00
Hocuri
61e0d14eed refactor: Remove small code duplication 2025-09-03 17:56:14 +02:00
Hocuri
2efbbcc669 bench: Improve benchmark_decrypting.rs benchmark 2025-09-03 17:56:13 +02:00
Hocuri
479a5632fb feat: Make reacting to v2 invites generic over the type of the invite (contact/group/broadcast) 2025-09-03 17:56:13 +02:00
Hocuri
9dc590cb35 feat: Rename vb-request-v2 -> vb-request-with-auth
Turns out that Alice reacts to a request-v2 message in exactly the same
way as to a request-with-auth message. So, no need to distinguish here.
2025-09-03 17:56:13 +02:00