MM-55060 - Calls: Add PushTypeCalls for calls-specific push notifications (#25405)

* add PushTypeCalls for calls-specific push notifications

* remove PushTypeCalls; add PushSubType for backwards compatability

* don't capitalize calls subtype

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Christopher Poile 2023-11-15 13:06:03 -05:00 committed by GitHub
parent f27a2ca263
commit 759bb70b2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,13 @@ const (
PushReceived = "Received by device"
)
// PushSubType allows for passing additional message type information
// to mobile clients in a backwards-compatible way
type PushSubType string
// PushSubTypeCalls is used by the Calls plugin
const PushSubTypeCalls PushSubType = "calls"
type PushNotificationAck struct {
Id string `json:"id"`
ClientReceivedAt int64 `json:"received_at"`
@ -59,6 +66,7 @@ type PushNotification struct {
RootId string `json:"root_id,omitempty"`
ChannelName string `json:"channel_name,omitempty"`
Type string `json:"type,omitempty"`
SubType PushSubType `json:"sub_type,omitempty"`
SenderId string `json:"sender_id,omitempty"`
SenderName string `json:"sender_name,omitempty"`
OverrideUsername string `json:"override_username,omitempty"`