MM-52804 - Implement SendPushNotification plugin api method (#24273)
* add SendPushNotification plugin api method * lint; add testing.Short bc of the sleep * add interface and generated layers * add fields to PluginPushNotification; generate mocks * SendPushNotification -> SendPluginPushNotification; improved comments * more comments; fix test * send api.ctx
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f13a531bca
Коммит
8418eefb75
@@ -1180,6 +1180,15 @@ type API interface {
|
||||
// @tag Upload
|
||||
// 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.
|
||||
//
|
||||
// Minimum server version: 9.0
|
||||
SendPluginPushNotification(notification *model.PluginPushNotification) error
|
||||
}
|
||||
|
||||
var handshake = plugin.HandshakeConfig{
|
||||
|
||||
Ссылка в новой задаче
Block a user