Changing avatars.

This commit is contained in:
John Livingston
2022-01-07 00:53:54 +01:00
parent 7d4576716a
commit 8f5bb9945a
34 changed files with 99 additions and 9783 deletions

View File

@ -10,15 +10,15 @@ local avatars = {};
local function load_avatar(filename)
local file = assert(io.open(path.join(avatars_dir, filename), "r"));
local result = {
type = 'image/png',
type = 'image/jpg',
content = b64(file:read("*a"))
};
file:close();
return result;
end
local AVATARS_COUNT = 40;
local AVATARS_COUNT = 130;
for i = 1, AVATARS_COUNT do
avatars[i] = load_avatar(i .. '.png');
avatars[i] = load_avatar(i .. '.jpg');
end
module:hook("iq-get/bare/vcard-temp:vCard", function (event)