8000 fix: trigger account subscription event on email verification by Pranav2612000 · Pull Request #5211 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: trigger account subscription event on email verification #5211

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

Conversation

Pranav2612000
Copy link
Contributor

What does this PR do?

Uses the userId to fetch the user to whom the account subscription event is to be sent.

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@Pranav2612000
Copy link
Contributor Author

@stnguyen90 Did you have time to take a look at this?

Copy link
Contributor
@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some tests or a screenshot of a successful manual test. If you need help, please post in the support channel on Discord.

@stnguyen90
Copy link
Contributor

I tested and looked at the function logs:

image

The event:

[
  {
    "project": {
      "teamInternalId": "1",
      "teamId": "64b6c8e4a88fca9111a5",
      "name": "Test",
      "region": "default",
      "description": "",
      "logo": "",
      "url": "",
      "version": "1.2.1",
      "legalName": "",
      "legalCountry": "",
      "legalState": "",
      "legalCity": "",
      "legalAddress": "",
      "legalTaxId": "",
      "services": [],
      "auths": {
        "limit": 0,
        "maxSessions": 10,
        "duration": 31536000,
        "emailPassword": true,
        "usersAuthMagicURL": true,
        "anonymous": true,
        "invites": true,
        "JWT": true,
        "phone": true
      },
      "authProviders": [],
      "platforms": [],
      "webhooks": [],
      "keys": [],
      "domains": [],
      "search": "test Test",
      "$id": "test",
      "$internalId": "1",
      "$createdAt": "2023-07-18T17:16:20.748+00:00",
      "$updatedAt": "2023-07-18T17:16:20.748+00:00",
      "$permissions": [
        "read(\"team:64b6c8e4a88fca9111a5\")",
        "update(\"team:64b6c8e4a88fca9111a5/owner\")",
        "update(\"team:64b6c8e4a88fca9111a5/developer\")",
        "delete(\"team:64b6c8e4a88fca9111a5/owner\")",
        "delete(\"team:64b6c8e4a88fca9111a5/developer\")"
      ],
      "$collection": "projects"
    },
    "user": { "$id": "", "$collection": "users" },
    "payload": {
      "$id": "64b6c9d2d4207b242811",
      "$createdAt": "2023-07-18T17:20:18.869+00:00",
      "userId": "joe",
      "secret": "2325239676b62dee502417fa901f5ba867800fda5884ee4385ac0003e8a40e29",
      "expire": "2023-07-25T17:20:18.868+00:00"
    },
    "context": [],
    "events": [
      "users.joe.verification.64b6c9d2d4207b242811.update",
      "users.*.verification.*.update",
      "users.joe.verification.*.update",
      "users.*.verification.64b6c9d2d4207b242811.update",
      "users.joe.verification.64b6c9d2d4207b242811",
      "users.*.verification.*",
      "users.joe.verification.*",
      "users.*.verification.64b6c9d2d4207b242811",
      "users.joe",
      "users.*"
    ]
  }
]

@stnguyen90 stnguyen90 modified the milestone: 1.4.0 Jul 18, 2023
@eldadfux eldadfux merged commit 9fafd39 into appwrite:master Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: email verification (confirmation) does not trigger any account subscription event
3 participants
0