Commit Graph

9487 Commits

Author SHA1 Message Date
Hocuri
380f6e2786 Some more small things I found while self-rewiewing 2025-09-15 17:34:41 +02:00
Hocuri
43d65cb012 Small things I found while self-reviewing 2025-09-15 10:13:15 +02:00
Hocuri
8fda2dee52 Remove another unnecessary function 2025-09-11 21:52:15 +02:00
Hocuri
640d81094a Remove rarely-used function is_any_broadcast() 2025-09-11 21:49:03 +02:00
Hocuri
c5b5d8020b test: simplify a bit 2025-09-11 21:39:11 +02:00
Hocuri
dfc969e3c0 Try reverting a possibly-unnecessary change 2025-09-11 21:29:33 +02:00
Hocuri
45bed57055 test: Improve test_leave_broadcast a bit 2025-09-11 18:26:04 +02:00
Hocuri
9914233683 Remove unused function 2025-09-11 17:53:56 +02:00
Hocuri
cc54c68b29 Improve docs 2025-09-11 17:53:41 +02:00
Hocuri
e8fff886a0 test: Improve test_leave_broadcast(), fix small bugs I found along the way 2025-09-11 14:48:49 +02:00
Hocuri
632dd28e5b test: Add test_leave_broadcast, fix bugs I found along the way 2025-09-11 11:40:44 +02:00
Hocuri
ac98289728 Remove outdated TODO 2025-09-10 22:40:05 +02:00
Hocuri
23c04c2134 security: Make sure that there is no trace of a member after they left 2025-09-10 22:39:02 +02:00
Hocuri
6cd499ebc1 Accept 9 lines of code duplication in exchange for lower code complexity 2025-09-10 22:23:04 +02:00
Hocuri
abd091db4c Remove TODO
Not possible to use create_multiuser_record(), because it's nicer to do
things in a transaction here
2025-09-10 18:55:40 +02:00
Hocuri
a5d9d43d47 refactor: small renames 2025-09-10 18:51:13 +02:00
Hocuri
dca184f72c refactor: simplify create_broadcast_ex() 2025-09-10 18:42:34 +02:00
Hocuri
d967bff702 Revert debug = 'full' 2025-09-10 17:55:40 +02:00
Hocuri
de10f31a3a test: Remove old test_broadcast, which tested manually adding a member to a broadcast 2025-09-09 20:36:00 +02:00
Hocuri
dd11364bef test: fix test_broadcast(): Broadcast channels are never unpromoted 2025-09-09 20:01:03 +02:00
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