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
@@ -1468,6 +1468,7 @@ func TestPushNotificationRace(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
s.products["channels"] = ch
|
||||
|
||||
app := New(ServerConnector(s.Channels()))
|
||||
require.NotPanics(t, func() {
|
||||
s.createPushNotificationsHub(th.Context)
|
||||
|
||||
@@ -1475,9 +1476,9 @@ func TestPushNotificationRace(t *testing.T) {
|
||||
|
||||
// Now we start sending messages after the PN hub is shut down.
|
||||
// We test all 3 notification types.
|
||||
th.App.clearPushNotification("currentSessionId", "userId", "channelId", "")
|
||||
app.clearPushNotification("currentSessionId", "userId", "channelId", "")
|
||||
|
||||
th.App.UpdateMobileAppBadge("userId")
|
||||
app.UpdateMobileAppBadge("userId")
|
||||
|
||||
notification := &PostNotification{
|
||||
Post: &model.Post{},
|
||||
@@ -1487,7 +1488,7 @@ func TestPushNotificationRace(t *testing.T) {
|
||||
},
|
||||
Sender: &model.User{},
|
||||
}
|
||||
th.App.sendPushNotification(notification, &model.User{}, true, false, model.CommentsNotifyAny)
|
||||
app.sendPushNotification(notification, &model.User{}, true, false, model.CommentsNotifyAny)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user