Skip to content

Commit fbd99d0

Browse files
committed
Fix redirectLink for sharings push notification
The flagship app doesn't support links to an external Cozy in a push notification currently. So, let's send the user to the list of their sharings for the moment.
1 parent 953a478 commit fbd99d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

model/sharing/invitation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,14 @@ func (s *Sharing) SendShortcutNotification(inst *instance.Instance, fileDoc *vfs
360360
if sharerName == "" {
361361
sharerName = inst.Translate("Sharing Empty name")
362362
}
363-
if err := s.SendShortcutPush(inst, fileDoc, previewURL, sharerName); err != nil {
363+
if err := s.SendShortcutPush(inst, fileDoc, sharerName); err != nil {
364364
inst.Logger().WithNamespace("sharing").
365365
Warnf("Cannot send push notification: %s", err)
366366
}
367367
return s.SendShortcutMail(inst, fileDoc, previewURL, sharerName)
368368
}
369369

370-
func (s *Sharing) SendShortcutPush(inst *instance.Instance, fileDoc *vfs.FileDoc, previewURL, sharerName string) error {
370+
func (s *Sharing) SendShortcutPush(inst *instance.Instance, fileDoc *vfs.FileDoc, sharerName string) error {
371371
notifiables, err := oauth.GetNotifiables(inst)
372372
if err != nil {
373373
return err
@@ -390,7 +390,7 @@ func (s *Sharing) SendShortcutPush(inst *instance.Instance, fileDoc *vfs.FileDoc
390390
Title: title,
391391
Message: message,
392392
Data: map[string]interface{}{
393-
"redirectLink": previewURL,
393+
"redirectLink": "drive/#/sharings",
394394
},
395395
}
396396
msg, err := job.NewMessage(&push)

0 commit comments

Comments
 (0)