fix: emit ChatModified event when can_send changes during secure

join

Also adds a test for the event (for securejoin group and secure join
contact).

Closes #7634
This commit is contained in:
Simon Laux
2026-01-16 15:38:59 +01:00
parent 47b49fd02e
commit ef309b5740
2 changed files with 110 additions and 1 deletions

View File

@@ -261,7 +261,10 @@ pub(super) async fn handle_auth_required(
.await?;
match invite {
QrInvite::Contact { .. } | QrInvite::Broadcast { .. } => {}
QrInvite::Contact { .. } | QrInvite::Broadcast { .. } => {
// This is to tell UI that Chat.can_send has changed
context.emit_event(EventType::ChatModified(chat_id));
}
QrInvite::Group { .. } => {
// The message reads "Alice replied, waiting to be added to the group…",
// so only show it when joining a group and not for a 1:1 chat or broadcast channel.