Added pagination to actor overview. Lazy loading actor avatars. Reduced hash digest length.

This commit is contained in:
2020-05-23 04:32:50 +02:00
parent 2fcd426b49
commit 75d49517b7
30 changed files with 35442 additions and 311 deletions

View File

@@ -276,7 +276,7 @@ async function curateProfile(profile) {
curatedProfile.description = domPurify.sanitize(profile.description?.replace(/\s+/g, ' '), { ALLOWED_TAGS: [] }).trim() || null;
const hasher = curatedProfile.description && blake2
.createHash('blake2b')
.createHash('blake2b', { digestLength: 24 })
.update(Buffer.from(slugify(curatedProfile.description)));
curatedProfile.descriptionHash = curatedProfile.description && hasher.digest('hex');