mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 22:46:29 +03:00
feat: allow clients to specify whether a call has video initially or not (#7740)
This commit is contained in:
committed by
GitHub
parent
d6bce56d18
commit
63bf4c4f33
@@ -801,6 +801,9 @@ impl MimeMessage {
|
||||
let accepted = self
|
||||
.get_header(HeaderDef::ChatWebrtcAccepted)
|
||||
.map(|s| s.to_string());
|
||||
let has_video = self
|
||||
.get_header(HeaderDef::ChatWebrtcHasVideoInitially)
|
||||
.map(|s| s.to_string());
|
||||
if let Some(part) = self.parts.first_mut() {
|
||||
if let Some(room) = room {
|
||||
if content == "call" {
|
||||
@@ -810,6 +813,9 @@ impl MimeMessage {
|
||||
} else if let Some(accepted) = accepted {
|
||||
part.param.set(Param::WebrtcAccepted, accepted);
|
||||
}
|
||||
if let Some(has_video) = has_video {
|
||||
part.param.set(Param::WebrtcHasVideoInitially, has_video);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user