mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 08:56:29 +03:00
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:
@@ -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".
|
||||
|
||||
Reference in New Issue
Block a user