From f4d021ab8c1ee093611a506d82bcbe2c53fd059c Mon Sep 17 00:00:00 2001 From: Alys Date: Tue, 31 Oct 2017 20:54:23 +1000 Subject: [PATCH] fix an inaccurate comment about guilds needing summaries --- website/server/models/group.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/website/server/models/group.js b/website/server/models/group.js index be6466214e..a5db42a748 100644 --- a/website/server/models/group.js +++ b/website/server/models/group.js @@ -142,15 +142,11 @@ schema.plugin(baseModel, { schema.pre('init', function ensureSummaryIsFetched (next, group) { // The Vue website makes the summary be mandatory for all new groups, but the // Angular website did not, and the API does not yet for backwards-compatibilty. - // When any public guild without a summary is fetched from the database, this code - // supplies the name as the summary. This can be removed when all public guilds have + // When any guild without a summary is fetched from the database, this code + // supplies the name as the summary. This can be removed when all guilds have // a summary and the API makes it mandatory (a breaking change!) - // NOTE: these groups do NOT need summaries: Tavern, private guilds, parties - // ALSO NOTE: it's possible for a private guild to become public and vice versa when - // a guild owner requests it of an admin so that must be taken into account - // when making the summary mandatory - process for changing privacy: - // http://habitica.wikia.com/wiki/Guilds#Changing_a_Guild_from_Private_to_Public_or_Public_to_Private - // Maybe because of that we'd want to keep this code here forever. @TODO: think about that. + // NOTE: the Tavern and parties do NOT need summaries so ensure they don't break + // if we remove this code. if (!group.summary) { group.summary = group.name ? group.name.substring(0, MAX_SUMMARY_SIZE_FOR_GUILDS) : ' '; }