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

External share with email - 2 mails sent instead of 1 #2521

Closed
mpivchev opened this issue Jul 7, 2023 · 4 comments · Fixed by #2544
Closed

External share with email - 2 mails sent instead of 1 #2521

mpivchev opened this issue Jul 7, 2023 · 4 comments · Fixed by #2544
Assignees

Comments

@mpivchev
Copy link
Collaborator

mpivchev commented Jul 7, 2023

According to the report, 2 emails are sent when adding an email address to external share, one with the invite and the other with the invite + notes. Also, the email template they have is wrong.
The expected outcome is that only 1 email is sent with the invitation and the note with the proper template. The report says that on server and android it works fine.

I tried this and I get the same emails:

First email with invite:

image

Second email with invite + note:

image

When I looked at our email request, we send the request to ocs/v2.php/apps/files_sharing/api/v1/shares with the following params:

▿ 7 elements
  ▿ 0 : 2 elements
    - key : "password"
    - value : ""
  ▿ 1 : 2 elements
    - key : "hideDownload"
    - value : "false"
  ▿ 2 : 2 elements
    - key : "shareType"
    - value : "4"
  ▿ 3 : 2 elements
    - key : "permissions"
    - value : "31"
  ▿ 4 : 2 elements
    - key : "shareWith"
    - value : "someEmail@gmail.com"
  ▿ 5 : 2 elements
    - key : "publicUpload"
    - value : "false"
  ▿ 6 : 2 elements
    - key : "path"
    - value : "Test6"

This is the response we are getting:

 {"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"id":"5","share_type":4,"uid_owner":"ios","displayname_owner":"ios","permissions":31,"can_edit":true,"can_delete":true,"stime":1688721859,"parent":null,"expiration":null,"token":"bRGyA3Pjc6Z6JA2","uid_file_owner":"ios","note":"","label":"","displayname_file_owner":"ios","path":"\/Test6","item_type":"folder","mimetype":"httpd\/unix-directory","has_preview":false,"storage_id":"home::ios","storage":7,"item_source":781,"file_source":781,"file_parent":644,"file_target":"\/Test6","share_with":"someEmail@gmail.com","password":null,"password_expiration_time":null,"send_password_by_talk":false,"share_with_displayname":"someEmail@gmail.com","mail_send":0,"hide_download":0,"attributes":null}}}
@mpivchev mpivchev added the bug label Jul 7, 2023
@mpivchev
Copy link
Collaborator Author

mpivchev commented Jul 7, 2023

From what I can see we don't handle emails or templates on the client side and only send a request for share with email, is that correct? @marinofaggiana

@mpivchev mpivchev added server and removed server labels Jul 7, 2023
@tobiasKaminsky
Copy link
Member

On Android we have a specific API, which allows to create share with note directly.
nextcloud/android-library#772

@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (dont pick) in 🤖 🍏 Clients team Jul 7, 2023
@mpivchev mpivchev added enhancement and removed bug labels Jul 7, 2023
@mpivchev mpivchev moved this from 🧭 Planning evaluation (dont pick) to 📄 To do (max 2 entries / member) in 🤖 🍏 Clients team Jul 7, 2023
@mpivchev mpivchev moved this from 📄 To do (max 2 entries / member) to 🧭 Planning evaluation (dont pick) in 🤖 🍏 Clients team Jul 7, 2023
@mpivchev
Copy link
Collaborator Author

mpivchev commented Jul 7, 2023

Added this to the board as a planned feature

@marinofaggiana
Copy link
Member

Good

@github-project-automation github-project-automation bot moved this from 🧭 Planning evaluation (dont pick) to ☑️ Done in 🤖 🍏 Clients team Jul 14, 2023
@mpivchev mpivchev reopened this Jul 14, 2023
@mpivchev mpivchev moved this from ☑️ Done to 🧭 Planning evaluation (dont pick) in 🤖 🍏 Clients team Jul 14, 2023
@tobiasKaminsky tobiasKaminsky moved this from 🧭 Planning evaluation (dont pick) to 📄 To do (max 2 entries / member) in 🤖 🍏 Clients team Jul 20, 2023
@mpivchev mpivchev moved this from 📄 To do (max 2 entries / member) to 🏗️ In progress in 🤖 🍏 Clients team Jul 21, 2023
@mpivchev mpivchev moved this from 🏗️ In progress to 📄 To do (max 2 entries / member) in 🤖 🍏 Clients team Jul 21, 2023
@mpivchev mpivchev moved this from 📄 To do (max 2 entries / member) to 🏗️ In progress in 🤖 🍏 Clients team Jul 21, 2023
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 🤖 🍏 Clients team Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants