Add option to disable call start/end notifications. Fixes #68

This commit is contained in:
Tulir Asokan
2019-08-24 22:42:03 +03:00
parent 07d43c4825
commit 80a0edd855
3 changed files with 22 additions and 0 deletions

View File

@ -578,10 +578,19 @@ func (user *User) HandleCallInfo(info whatsappExt.CallInfo) {
}
switch info.Type {
case whatsappExt.CallOffer:
if !user.bridge.Config.Bridge.CallNotices.Start {
return
}
data.Text = "Incoming call"
case whatsappExt.CallOfferVideo:
if !user.bridge.Config.Bridge.CallNotices.Start {
return
}
data.Text = "Incoming video call"
case whatsappExt.CallTerminate:
if !user.bridge.Config.Bridge.CallNotices.End {
return
}
data.Text = "Call ended"
data.ID += "E"
default: