Added pagination to actor overview. Lazy loading actor avatars. Reduced hash digest length.
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -374,7 +374,7 @@ async function fetchSource(source, baseMedia) {
|
||||
try {
|
||||
const tempFilePath = path.join(config.media.path, 'temp', `${baseMedia.id}`);
|
||||
|
||||
const hasher = new blake2.Hash('blake2b');
|
||||
const hasher = new blake2.Hash('blake2b', { digestLength: 24 });
|
||||
hasher.setEncoding('hex');
|
||||
|
||||
const tempFileTarget = fs.createWriteStream(tempFilePath);
|
||||
|
||||
Reference in New Issue
Block a user