return correct videochat-type

This commit is contained in:
B. Petersen
2020-07-22 18:31:34 +02:00
parent 39364d1f6c
commit 72d95075a0
6 changed files with 69 additions and 21 deletions

View File

@@ -1633,13 +1633,14 @@ pub async fn send_videochat_invitation(context: &Context, chat_id: ChatId) -> Re
format!("{}{}", instance, room)
};
let url = instance.replace("basicwebrtc:", "");
let mut msg = Message::new(Viewtype::VideochatInvitation);
msg.param.set(Param::WebrtcInstance, &instance);
msg.text = Some(
context
.stock_string_repl_str(StockMessage::VideochatInviteMsgBody, url)
.stock_string_repl_str(
StockMessage::VideochatInviteMsgBody,
Message::parse_webrtc_instance(&instance).1,
)
.await,
);
send_msg(context, chat_id, &mut msg).await