mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
Add more documentation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#![allow(missing_docs)]
|
||||
//! # QR code generation module.
|
||||
|
||||
use anyhow::Result;
|
||||
use base64::Engine as _;
|
||||
@@ -14,6 +14,10 @@ use crate::{
|
||||
securejoin, stock_str,
|
||||
};
|
||||
|
||||
/// Returns SVG of the QR code to join the group or verify contact.
|
||||
///
|
||||
/// If `chat_id` is `None`, returns verification QR code.
|
||||
/// Otherwise, returns secure join QR code.
|
||||
pub async fn get_securejoin_qr_svg(context: &Context, chat_id: Option<ChatId>) -> Result<String> {
|
||||
if let Some(chat_id) = chat_id {
|
||||
generate_join_group_qr_code(context, chat_id).await
|
||||
|
||||
Reference in New Issue
Block a user