1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

allow administration to change/reset a user's password

This commit is contained in:
Rigel Kent 2018-10-06 13:54:00 +02:00 committed by Chocobozzz
parent c7ca4c8be7
commit 328c78bc4a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
13 changed files with 217 additions and 4 deletions

View file

@ -101,6 +101,22 @@ class Emailer {
return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
}
addForceResetPasswordEmailJob (to: string, resetPasswordUrl: string) {
const text = `Hi dear user,\n\n` +
`Your password has been reset on ${CONFIG.WEBSERVER.HOST}! ` +
`Please follow this link to reset it: ${resetPasswordUrl}\n\n` +
`Cheers,\n` +
`PeerTube.`
const emailPayload: EmailPayload = {
to: [ to ],
subject: 'Reset of your PeerTube password',
text
}
return JobQueue.Instance.createJob({ type: 'email', payload: emailPayload })
}
addNewFollowNotification (to: string[], actorFollow: ActorFollowModel, followType: 'account' | 'channel') {
const followerName = actorFollow.ActorFollower.Account.getDisplayName()
const followingName = (actorFollow.ActorFollowing.VideoChannel || actorFollow.ActorFollowing.Account).getDisplayName()