Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

User notifications (email) #2

Closed
1 of 11 tasks
sballesteros opened this issue Sep 16, 2019 · 3 comments
Closed
1 of 11 tasks

User notifications (email) #2

sballesteros opened this issue Sep 16, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request priority

Comments

@sballesteros
Copy link
Contributor

sballesteros commented Sep 16, 2019

Updated per discussion with @dasaderi and @SamanthaHindle on slack

User notifications (via email)

  • when a user review has been moderated (note that this is triggered only after moderators validated user reports and not each time a user reports a potential issue).
  • when a user has been blocked (lose write access to the platform) by a moderator.
  • when a review is added to a preprint for which the user had requested feedback (via a request for reviews).

Implementation

Backend

  • Get a default email address from ORCID (see https://members.orcid.org/api/tutorial/read-orcid-records )
  • Allow user to update that email (or set it in case where no emails could be found in the public ORCID record)
  • Add logic to verify the email address (only for emails not imported from ORCID). Notifications will only be sent to emails that are verified. Verification will be done by sending an email with a "magic" link to the user. If the user receives the email and clicks on the link the email address will be considered verified.
  • Add ability to set notification preferences (see frontend section below)
  • Send the emails with sendgrid on Azure. Emails will be sent as plain text only (so unstyled).

Frontend

  • UI to display and update the email address (part of the settings). Note that the email address is never displayed publicly and is only used for notification purposes.
  • UI to keep track of the verification status of an email
  • UI for the notification preference settings (YES / NO) to assess whether or not notifications should be sent when new reviews are added to a preprint for which the user requested feedback
@sballesteros sballesteros added discussion not ready work in progress (content will change soon) labels Sep 16, 2019
@dasaderi
Copy link
Member

dasaderi commented Oct 2, 2019

If we want to allow for both authors and readers to solicit feedback (which I'm okay with) I think that we should somehow differentiate that. If I am a user I want to know if the authors have explicitly asked for feedback and I'm going to value that request more than if another community member has asked for feedback.

Another thought I had is that it would be useful for a user to ping another user they know would know something about the preprint and provide good feedback on let's say, stats. That could be a separate way for a user to call for action on a preprint, by sending an invitation to another user to review that preprint?

@sballesteros sballesteros added enhancement New feature or request and removed not ready work in progress (content will change soon) discussion labels Nov 28, 2019
@sballesteros sballesteros changed the title Notifications User notifications (email) Dec 16, 2019
@sballesteros sballesteros self-assigned this Dec 16, 2019
@sballesteros sballesteros pinned this issue Dec 16, 2019
@sballesteros
Copy link
Contributor Author

sballesteros commented Dec 16, 2019

I really like the distinction made by @dasaderi here:

If I am a user I want to know if the authors have explicitly asked for feedback and I'm going to value that request more than if another community member has asked for feedback.

However this requires significantly more data that we currently have (knowing when a user is actually author of a preprint). @dasaderi maybe you can create another issue for that so it can be tackled later once more work is done to have a good understanding of who are the preprint authors?
Otherwise we probably need to prioritize that work before doing the notification part.

While not as good as the more nuanced feature, I think that issuing notifications when a review is added to a preprint for which a user had requested feedback (via a request for reviews) is a good (and robust - in the sense that it doesn't depends on the difficult task to link rapid users to preprint authors) starting point.

@sballesteros
Copy link
Contributor Author

sballesteros commented Dec 22, 2019

const updateContactPointAction = {
  '@type': 'UpdateContactPointAction',
  agent: 'user:userId',
  object: 'contact:userId',
  payload: {
    contactType: 'notifications',
    active: true,
    email: 'mailto:me@example.com'
  },
  result: {
    '@id': 'user:userId',
    contactPoint: {
      '@type': 'ContactPoint',
      contactType: 'notifications',
      active: true,
      email: 'mailto:me@example.com',
      token: {
        '@type': 'ContactPointVerificationToken',
        value: 'XXXX'
      }
    }
  }
};

const verifyContactPointAction = {
  '@type': 'VerifyContactPointAction',
  agent: 'user:userId',
  object: 'contact:userId',
  token: {
    '@type': 'ContactPointVerificationToken',
    value: 'XXXX'
  },
  result: {
    '@id': 'user:userId',
    contactPoint: {
      '@type': 'ContactPoint',
      contactType: 'notifications',
      active: true,
      email: 'mailto:me@example.com',
      dateVerified: new Date().toISOString()
    }
  }
};

sballesteros added a commit that referenced this issue Dec 22, 2019
sballesteros added a commit that referenced this issue Dec 23, 2019
sballesteros added a commit that referenced this issue Dec 23, 2019
sballesteros added a commit that referenced this issue Dec 24, 2019
sballesteros added a commit that referenced this issue Dec 27, 2019
sballesteros added a commit that referenced this issue Dec 27, 2019
sballesteros added a commit that referenced this issue Dec 30, 2019
sballesteros added a commit that referenced this issue Dec 30, 2019
sballesteros added a commit that referenced this issue Dec 31, 2019
@sballesteros sballesteros unpinned this issue Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request priority
Projects
None yet
Development

No branches or pull requests

2 participants