Skip to content

Commit

Permalink
Fix notification actions not working when created by a plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ppacher committed May 23, 2023
1 parent 1e34194 commit fd6ddf9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin/internal/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,21 +270,26 @@ func NotificationActionTypeFromProto(action *proto.NotificationAction) *notifica

switch payload := action.GetActionType().(type) {
case *proto.NotificationAction_InjectEventId:
res.Type = notifications.ActionTypeInjectEvent
res.Payload = payload.InjectEventId

case *proto.NotificationAction_OpenPage:
res.Type = notifications.ActionTypeOpenPage
res.Payload = payload.OpenPage

case *proto.NotificationAction_OpenProfile:
res.Type = notifications.ActionTypeOpenProfile
res.Payload = payload.OpenProfile

case *proto.NotificationAction_OpenSetting:
res.Type = notifications.ActionTypeOpenSetting
res.Payload = notifications.ActionTypeOpenSettingPayload{
Key: payload.OpenSetting.Key,
Profile: payload.OpenSetting.Profile,
}

case *proto.NotificationAction_OpenUrl:
res.Type = notifications.ActionTypeOpenURL
res.Payload = payload.OpenUrl

case *proto.NotificationAction_Webhook:
Expand Down

0 comments on commit fd6ddf9

Please sign in to comment.