MM-53924 - Implement push notifications plugin hook and plugin api method (#24350)
* Revert "MM-52804 - Implement SendPushNotification plugin api method (#24273)" This reverts commit8418eefb75. * Revert "MM-53924 - Implement NotificationWillBePushed plugin hook (#24263)" This reverts commitf13a531bca. * 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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dad579daee
Коммит
69c11cfe14
@@ -1181,14 +1181,17 @@ type API interface {
|
||||
// Minimum server version: 7.6
|
||||
GetUploadSession(uploadID string) (*model.UploadSession, error)
|
||||
|
||||
// SendPluginPushNotification will attempt to send a push notification to `notification.User`, using
|
||||
// `notification.Post` as the source of the notification. The server will use the PluginPushNotification
|
||||
// data to construct the final push notification according to the server's configuration and license. Refer
|
||||
// to `App.BuildPushNotificationMessage` for the logic used to construct the push notification.
|
||||
// Note: the NotificationWillBePushed hook will be run after SendPluginPushNotification is called.
|
||||
// SendPushNotification will send a push notification to all of user's sessions.
|
||||
//
|
||||
// It is the responsibility of the plugin to respect the server's configuration and licence,
|
||||
// especially related to `cfg.EmailSettings.PushNotificationContents`, particularly
|
||||
// `model.IdLoadedNotification` and the generic settings.
|
||||
// Refer to `app.sendPushNotificationSync` for the logic used to construct push notifications.
|
||||
//
|
||||
// Note: the NotificationWillBePushed hook will be run after SendPushNotification is called.
|
||||
//
|
||||
// Minimum server version: 9.0
|
||||
SendPluginPushNotification(notification *model.PluginPushNotification) error
|
||||
SendPushNotification(notification *model.PushNotification, userID string) *model.AppError
|
||||
}
|
||||
|
||||
var handshake = plugin.HandshakeConfig{
|
||||
|
||||
Ссылка в новой задаче
Block a user