gst-meet now replaces {jid} and {jid_user} with empty strings if no JID

The real JID of MUC participants is not always available (noticed in the
log of #6)
This commit is contained in:
Jasper Hugo 2021-10-25 15:25:14 +07:00
parent c6292caff5
commit a57ce262ff
1 changed files with 3 additions and 3 deletions

View File

@ -231,15 +231,15 @@ async fn main_inner() -> Result<()> {
.jid
.as_ref()
.map(|jid| jid.to_string())
.context("missing jid")?,
.unwrap_or_default(),
)
.replace(
"{jid_user}",
participant
.jid
.as_ref()
.and_then(|jid| jid.node.as_ref())
.context("jid missing node")?,
.and_then(|jid| jid.node.as_deref())
.unwrap_or_default(),
)
.replace("{participant_id}", &participant.muc_jid.resource)
.replace("{nick}", &participant.nick.unwrap_or_default());