Skip to content

Commit

Permalink
gst-meet now replaces {jid} and {jid_user} with empty strings if no JID
Browse files Browse the repository at this point in the history
The real JID of MUC participants is not always available (noticed in the
log of #6)
  • Loading branch information
jbg committed Oct 25, 2021
1 parent c6292ca commit a57ce26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gst-meet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit a57ce26

Please sign in to comment.