mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Add mattermost authentication
This commit is contained in:
parent
dad5798472
commit
5cda55086a
14 changed files with 116 additions and 13 deletions
|
@ -111,6 +111,15 @@ module.exports = function (sequelize, DataTypes) {
|
|||
photo = letterAvatars(profile.username)
|
||||
}
|
||||
break
|
||||
case 'mattermost':
|
||||
photo = profile.avatarUrl
|
||||
if (photo) {
|
||||
if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400')
|
||||
else photo = photo.replace(/(\?s=)\d*$/i, '$196')
|
||||
} else {
|
||||
photo = letterAvatars(profile.username)
|
||||
}
|
||||
break
|
||||
case 'dropbox':
|
||||
// no image api provided, use gravatar
|
||||
photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue