MM-53924 - Implement push notifications plugin hook and plugin api method (#24350)

* Revert "MM-52804 - Implement SendPushNotification plugin api method (#24273)"

This reverts commit 8418eefb75.

* Revert "MM-53924 - Implement NotificationWillBePushed plugin hook (#24263)"

This reverts commit f13a531bca.

* implement NotificationWillBePushed plugin hook

* implement SendPushNotification plugin api method

* move where we're setting post and channel type

* fix comment

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Christopher Poile
2023-08-24 12:33:53 -04:00
коммит произвёл GitHub
родитель dad579daee
Коммит 69c11cfe14
16 изменённых файлов: 169 добавлений и 166 удалений

Просмотреть файл

@@ -1267,9 +1267,9 @@ func (api *apiTimerLayer) GetUploadSession(uploadID string) (*model.UploadSessio
return _returnsA, _returnsB
}
func (api *apiTimerLayer) SendPluginPushNotification(notification *model.PluginPushNotification) error {
func (api *apiTimerLayer) SendPushNotification(notification *model.PushNotification, userID string) *model.AppError {
startTime := timePkg.Now()
_returnsA := api.apiImpl.SendPluginPushNotification(notification)
api.recordTime(startTime, "SendPluginPushNotification", _returnsA == nil)
_returnsA := api.apiImpl.SendPushNotification(notification, userID)
api.recordTime(startTime, "SendPushNotification", _returnsA == nil)
return _returnsA
}