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.
This commit is contained in:
Hocuri
2025-09-09 10:17:53 +02:00
committed by GitHub
parent 82bc1bf0b1
commit 1cc7ce6e27
4 changed files with 79 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ use std::path::PathBuf;
use crate::chat::ChatId;
use crate::config::Config;
use crate::constants::Chattype;
use crate::contact::ContactId;
use crate::ephemeral::Timer as EphemeralTimer;
use crate::message::MsgId;
@@ -272,6 +273,9 @@ pub enum EventType {
/// ID of the contact that wants to join.
contact_id: ContactId,
/// The type of the joined chat.
chat_type: Chattype,
/// Progress as:
/// 300=vg-/vc-request received, typically shown as "bob@addr joins".
/// 600=vg-/vc-request-with-auth received and verified, typically shown as "bob@addr verified".