Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redirectLink for sharings push notification #4507

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions model/sharing/invitation.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,14 @@ func (s *Sharing) SendShortcutNotification(inst *instance.Instance, fileDoc *vfs
if sharerName == "" {
sharerName = inst.Translate("Sharing Empty name")
}
if err := s.SendShortcutPush(inst, fileDoc, previewURL, sharerName); err != nil {
if err := s.SendShortcutPush(inst, fileDoc, sharerName); err != nil {
inst.Logger().WithNamespace("sharing").
Warnf("Cannot send push notification: %s", err)
}
return s.SendShortcutMail(inst, fileDoc, previewURL, sharerName)
}

func (s *Sharing) SendShortcutPush(inst *instance.Instance, fileDoc *vfs.FileDoc, previewURL, sharerName string) error {
func (s *Sharing) SendShortcutPush(inst *instance.Instance, fileDoc *vfs.FileDoc, sharerName string) error {
notifiables, err := oauth.GetNotifiables(inst)
if err != nil {
return err
Expand All @@ -390,7 +390,7 @@ func (s *Sharing) SendShortcutPush(inst *instance.Instance, fileDoc *vfs.FileDoc
Title: title,
Message: message,
Data: map[string]interface{}{
"redirectLink": previewURL,
"redirectLink": "drive/#/sharings",
},
}
msg, err := job.NewMessage(&push)
Expand Down
4 changes: 2 additions & 2 deletions tests/system/nextcloud/before-starting/create-account.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

# echo -ne fred | md5sum
export OC_PASS=570a90bfbf8c7eab5dc5d4e26832d5b1
# echo -ne fred-password | md5sum
export OC_PASS=796ecbcc9e42a074e22b2c9aa03b79c6
php occ user:add --password-from-env --display-name="Fred" --group="users" fred
2 changes: 1 addition & 1 deletion tests/system/tests/webdav_nextcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
host = container.host
port = container.first_mapped_port
user = "fred"
pass = "570a90bfbf8c7eab5dc5d4e26832d5b1"
pass = "796ecbcc9e42a074e22b2c9aa03b79c6"

inst = Instance.create name: "Fred"
auth = { login: user, password: pass, url: "http://#{host}:#{port}/" }
Expand Down
Loading