Bot avatar:
* For now, only one avatar possible, * uses mod_random_vcard_peertubelivechat, * mod_random_vcard_peertubelivechat has a new option with the avatar list (instead of a hardcoded avatar number) * Peertube lists available avatars files, and pass it to mod_random_vcard_peertubelivechat
This commit is contained in:
@ -32,3 +32,14 @@ for (let i = 1; i <= count; i++) {
|
||||
sharp(inputFile).flatten({background}).resize(120, 120).jpeg({quality: 95, mozjpeg: true}).toFile(path.join(outputDir, out.toString() + '.jpg'))
|
||||
}
|
||||
}
|
||||
|
||||
// Moderation bot avatar: for now taking image 2, and applying a grey background.
|
||||
{
|
||||
const i = 2
|
||||
const inputFile = path.join(inputDir, i + '.svg')
|
||||
|
||||
const background = '#858da0'
|
||||
const outputDir = './dist/server/bot_avatars/'
|
||||
const out = 1
|
||||
sharp(inputFile).flatten({background}).resize(120, 120).jpeg({quality: 95, mozjpeg: true}).toFile(path.join(outputDir, out.toString() + '.jpg'))
|
||||
}
|
||||
|
Reference in New Issue
Block a user