Add ability to specify prefered gravatar email for user profile
Stackalytics does not ensure configuration email order during processing. Thus additional field is required to ensure a proper email is used to compile gravatar url. Change-Id: I01805b1dec76cd1abd57a82f75cc158696f5c165 Signed-off-by: Andrii Ostapenko <aostapenko@stackalytics.io>
This commit is contained in:
@@ -3530,6 +3530,7 @@
|
||||
"end_date": null
|
||||
}
|
||||
],
|
||||
"gravatar_email": "anost1986@gmail.com",
|
||||
"user_name": "Andrii Ostapenko",
|
||||
"emails": ["aostapenko@mirantis.com", "andrey_ostapenko@symantec.com", "ao129q@att.com",
|
||||
"andrii.ostapenko@att.com", "anost1986@gmail.com", "aostapenko@stackalytics.io"]
|
||||
|
||||
@@ -370,6 +370,8 @@ function extendWithGravatar(record, image_size) {
|
||||
var gravatar = "stackalytics";
|
||||
if (record.author_email) {
|
||||
gravatar = record.author_email;
|
||||
} else if (record.gravatar_email) {
|
||||
gravatar = record.gravatar_email;
|
||||
} else if (record.emails && record.emails.length > 0) {
|
||||
gravatar = record.emails[0];
|
||||
} else if (record.user_id) {
|
||||
|
||||
@@ -36,6 +36,9 @@ default_data = {
|
||||
"user_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"gravatar_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
Reference in New Issue
Block a user