mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
change to User ID - change mail var _DISPLAYNAME _DISPLAY_NAME
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = {
|
||||
guildsPaginateBooleanString: 'req.query.paginate must be a boolean string.',
|
||||
groupIdRequired: 'req.params.groupId must contain a groupId.',
|
||||
groupRemainOrLeaveChallenges: 'req.query.keep must be either "remain-in-challenges" or "leave-challenges"',
|
||||
managerIdRequired: 'req.body.managerId must contain a user ID.',
|
||||
managerIdRequired: 'req.body.managerId must contain a User ID.',
|
||||
noSudoAccess: 'You don\'t have sudo access.',
|
||||
|
||||
eventRequired: '"req.params.event" is required.',
|
||||
|
||||
@@ -230,9 +230,9 @@
|
||||
"memberCannotRemoveYourself": "You cannot remove yourself!",
|
||||
"groupMemberNotFound": "User not found among group's members",
|
||||
"mustBeGroupMember": "Must be member of the group.",
|
||||
"canOnlyInviteEmailUuid": "Can only invite using user IDs, emails, or usernames.",
|
||||
"canOnlyInviteEmailUuid": "Can only invite using User IDs, emails, or usernames.",
|
||||
"inviteMissingEmail": "Missing email address in invite.",
|
||||
"inviteMissingUuid": "Missing user id in invite",
|
||||
"inviteMissingUuid": "Missing User ID in invite",
|
||||
"inviteMustNotBeEmpty": "Invite must not be empty.",
|
||||
"partyMustbePrivate": "Parties must be private",
|
||||
"userAlreadyInGroup": "UserID: <%= userId %>, User \"<%= username %>\" already in that group.",
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"messageAuthEmailTaken": "Email already taken",
|
||||
"messageAuthNoUserFound": "No user found.",
|
||||
"messageAuthMustBeLoggedIn": "You must be logged in.",
|
||||
"messageAuthMustIncludeTokens": "You must include a token and uid (user id) in your request",
|
||||
"messageAuthMustIncludeTokens": "You must include a token and uid (User ID) in your request",
|
||||
|
||||
"messageGroupAlreadyInParty": "Already in a party, try refreshing.",
|
||||
"messageGroupOnlyLeaderCanUpdate": "Only the group leader can update the group!",
|
||||
|
||||
@@ -49,7 +49,7 @@ let api = {};
|
||||
* @apiSuccess {String} challenge.name Full name of challenge.
|
||||
* @apiSuccess {String} challenge.shortName A shortened name for the challenge, to be used as a tag.
|
||||
* @apiSuccess {Object} challenge.leader User details of challenge leader.
|
||||
* @apiSuccess {UUID} challenge.leader._id User id of challenge leader.
|
||||
* @apiSuccess {UUID} challenge.leader._id User ID of challenge leader.
|
||||
* @apiSuccess {Object} challenge.leader.profile Profile information of leader.
|
||||
* @apiSuccess {Object} challenge.leader.profile.name Display Name of leader.
|
||||
* @apiSuccess {String} challenge.updatedAt Timestamp of last update.
|
||||
|
||||
@@ -289,7 +289,7 @@ api.likeChat = {
|
||||
* @apiSuccess {Object} data.likes The likes of the message
|
||||
* @apiSuccess {Object} data.flags The flags of the message
|
||||
* @apiSuccess {Number} data.flagCount The number of flags the message has
|
||||
* @apiSuccess {UUID} data.uuid The user id of the author of the message
|
||||
* @apiSuccess {UUID} data.uuid The User ID of the author of the message
|
||||
* @apiSuccess {String} data.user The username of the author of the message
|
||||
*
|
||||
* @apiUse GroupNotFound
|
||||
|
||||
@@ -941,11 +941,11 @@ api.removeGroupMember = {
|
||||
* {"name": "User2", "email": "user-2@example.com"}
|
||||
* ]
|
||||
* }
|
||||
* @apiParamExample {json} User Ids
|
||||
* @apiParamExample {json} User IDs
|
||||
* {
|
||||
* "uuids": ["user-id-of-existing-user", "user-id-of-another-existing-user"]
|
||||
* }
|
||||
* @apiParamExample {json} User Ids and Emails
|
||||
* @apiParamExample {json} User IDs and Emails
|
||||
* {
|
||||
* "emails": [
|
||||
* {"email": "user-1@example.com"},
|
||||
@@ -955,7 +955,7 @@ api.removeGroupMember = {
|
||||
* }
|
||||
*
|
||||
* @apiSuccess {Array} data The invites
|
||||
* @apiSuccess {Object} data[0] If the invitation was a user id, you'll receive back an object. You'll receive one Object for each succesful user id invite.
|
||||
* @apiSuccess {Object} data[0] If the invitation was a User ID, you'll receive back an object. You'll receive one Object for each succesful User ID invite.
|
||||
* @apiSuccess {String} data[1] If the invitation was an email, you'll receive back the email. You'll receive one String for each successful email invite.
|
||||
*
|
||||
* @apiSuccessExample {json} Successful Response with Emails
|
||||
@@ -966,13 +966,13 @@ api.removeGroupMember = {
|
||||
* ]
|
||||
* }
|
||||
*
|
||||
* @apiSuccessExample {json} Successful Response with User Id
|
||||
* @apiSuccessExample {json} Successful Response with User ID
|
||||
* {
|
||||
* "data": [
|
||||
* { id: 'the-id-of-the-invited-user', name: 'The group name', inviter: 'your-user-id' }
|
||||
* ]
|
||||
* }
|
||||
* @apiSuccessExample {json} Successful Response with User Ids and Emails
|
||||
* @apiSuccessExample {json} Successful Response with User IDs and Emails
|
||||
* {
|
||||
* "data": [
|
||||
* "user-1@example.com",
|
||||
@@ -987,9 +987,9 @@ api.removeGroupMember = {
|
||||
* param `Array`.
|
||||
* @apiError (400) {BadRequest} UuidOrEmailOnly The `emails` and `uuids` params were both missing and/or a
|
||||
* key other than `emails` or `uuids` was provided in the body param.
|
||||
* @apiError (400) {BadRequest} CannotInviteSelf User id or email of invitee matches that of the inviter.
|
||||
* @apiError (400) {BadRequest} CannotInviteSelf User ID or email of invitee matches that of the inviter.
|
||||
* @apiError (400) {BadRequest} MustBeArray The `uuids` or `emails` body param was not an array.
|
||||
* @apiError (400) {BadRequest} TooManyInvites A max of 100 invites (combined emails and user ids) can
|
||||
* @apiError (400) {BadRequest} TooManyInvites A max of 100 invites (combined emails and User IDs) can
|
||||
* be sent out at a time.
|
||||
* @apiError (400) {BadRequest} ExceedsMembersLimit A max of 30 members can join a party.
|
||||
*
|
||||
|
||||
@@ -143,7 +143,7 @@ const heroAdminFields = 'contributor balance profile.name purchased items auth f
|
||||
|
||||
/**
|
||||
* @api {get} /api/v3/hall/heroes/:heroId Get any user ("hero") given the UUID
|
||||
* @apiParam (Path) {UUID} heroId user ID
|
||||
* @apiParam (Path) {UUID} heroId User ID
|
||||
* @apiName GetHero
|
||||
* @apiGroup Hall
|
||||
* @apiPermission Admin
|
||||
@@ -188,7 +188,7 @@ const gemsPerTier = {1: 3, 2: 3, 3: 3, 4: 4, 5: 4, 6: 4, 7: 4, 8: 0, 9: 0};
|
||||
|
||||
/**
|
||||
* @api {put} /api/v3/hall/heroes/:heroId Update any user ("hero")
|
||||
* @apiParam (Path) {UUID} heroId user ID
|
||||
* @apiParam (Path) {UUID} heroId User ID
|
||||
* @apiName UpdateHero
|
||||
* @apiGroup Hall
|
||||
* @apiPermission Admin
|
||||
|
||||
@@ -18,12 +18,13 @@ let api = {};
|
||||
* @apiSuccess {Object} data.likes The likes of the message (always an empty object)
|
||||
* @apiSuccess {Object} data.flags The flags of the message
|
||||
* @apiSuccess {Number} data.flagCount The number of flags the message has
|
||||
* @apiSuccess {UUID} data.uuid The user id of the author of the message, or of the recipient if `sent` is true
|
||||
* @apiSuccess {UUID} data.uuid The User ID of the author of the message, or of the recipient if `sent` is true
|
||||
* @apiSuccess {String} data.user The Display Name of the author of the message, or of the recipient if `sent` is true
|
||||
* @apiSuccess {String} data.username The Username of the author of the message, or of the recipient if `sent` is true
|
||||
*
|
||||
* @apiUse MessageNotFound
|
||||
* @apiUse MessageIdRequired
|
||||
* @apiError (400) {BadRequest} messageGroupChatFlagAlreadyReported The message has already been flagged
|
||||
* @apiError (400) {BadRequest} messageGroupChatFlagAlreadyReported You have already reported this message
|
||||
*/
|
||||
api.flagPrivateMessage = {
|
||||
method: 'POST',
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class ChatReporter {
|
||||
{name: 'MESSAGE_TIME', content: (new Date(message.timestamp)).toString()},
|
||||
{name: 'MESSAGE_TEXT', content: message.text},
|
||||
|
||||
{name: 'REPORTER_DISPLAYNAME', content: this.user.profile.name},
|
||||
{name: 'REPORTER_DISPLAY_NAME', content: this.user.profile.name},
|
||||
{name: 'REPORTER_USERNAME', content: this.user.auth.local.username},
|
||||
{name: 'REPORTER_UUID', content: this.user._id},
|
||||
{name: 'REPORTER_EMAIL', content: reporterEmail},
|
||||
@@ -36,7 +36,7 @@ export default class ChatReporter {
|
||||
|
||||
createGenericAuthorVariables (prefix, {user, username, uuid, email}) {
|
||||
return [
|
||||
{name: `${prefix}_DISPLAYNAME`, content: user},
|
||||
{name: `${prefix}_DISPLAY_NAME`, content: user},
|
||||
{name: `${prefix}_USERNAME`, content: username},
|
||||
{name: `${prefix}_UUID`, content: uuid},
|
||||
{name: `${prefix}_EMAIL`, content: email},
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Strategy as GoogleStrategy } from 'passport-google-oauth20';
|
||||
// Passport session setup.
|
||||
// To support persistent login sessions, Passport needs to be able to
|
||||
// serialize users into and deserialize users out of the session. Typically,
|
||||
// this will be as simple as storing the user ID when serializing, and finding
|
||||
// this will be as simple as storing the User ID when serializing, and finding
|
||||
// the user by ID when deserializing. However, since this example does not
|
||||
// have a database of user records, the complete Facebook profile is serialized
|
||||
// and deserialized.
|
||||
|
||||
@@ -392,7 +392,7 @@ function getInviteCount (uuids, emails) {
|
||||
/**
|
||||
* Checks invitation uuids and emails for possible errors.
|
||||
*
|
||||
* @param uuids An array of user ids
|
||||
* @param uuids An array of User IDs
|
||||
* @param emails An array of emails
|
||||
* @param res Express res object for use with translations
|
||||
* @throws BadRequest An error describing the issue with the invitations
|
||||
|
||||
Reference in New Issue
Block a user