mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
prefix webrtc_instance by type, unify naming
This commit is contained in:
@@ -245,10 +245,11 @@ impl MimeMessage {
|
||||
fn parse_videochat_headers(&mut self) {
|
||||
if let Some(value) = self.get(HeaderDef::ChatContent).cloned() {
|
||||
if value == "videochat-invitation" {
|
||||
let url = self.get(HeaderDef::ChatVideochatUrl).cloned();
|
||||
let instance = self.get(HeaderDef::ChatWebrtcInstance).cloned();
|
||||
if let Some(part) = self.parts.first_mut() {
|
||||
part.typ = Viewtype::VideochatInvitation;
|
||||
part.param.set(Param::VideochatUrl, url.unwrap_or_default());
|
||||
part.param
|
||||
.set(Param::WebrtcInstance, instance.unwrap_or_default());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1473,7 +1474,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
mimeparser.parts[0]
|
||||
.param
|
||||
.get(Param::VideochatUrl)
|
||||
.get(Param::WebrtcInstance)
|
||||
.unwrap_or_default(),
|
||||
"https://example.org/p2p/?roomname=6HiduoAn4xN"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user