fix: expire stale call pushes
This commit is contained in:
+3
-1
@@ -37,6 +37,8 @@ const (
|
||||
constCallEventHangUp = "hang-up"
|
||||
|
||||
// Message headers representing call states.
|
||||
// Call is ringing.
|
||||
constCallMsgStarted = "started"
|
||||
// Call is established.
|
||||
constCallMsgAccepted = "accepted"
|
||||
// Previously establied call has successfully finished.
|
||||
@@ -149,7 +151,7 @@ func normalizeCallInvite(head map[string]any, content any) (map[string]any, any,
|
||||
for key, value := range head {
|
||||
normalizedHead[key] = value
|
||||
}
|
||||
normalizedHead["webrtc"] = "started"
|
||||
normalizedHead["webrtc"] = constCallMsgStarted
|
||||
normalizedHead["x-im-type"] = "call"
|
||||
if _, ok := normalizedHead["mime"]; !ok {
|
||||
normalizedHead["mime"] = "application/json"
|
||||
|
||||
Reference in New Issue
Block a user