# HG changeset patch # User Kim Alvefur # Date 1653920091 -7200 # Node ID 89226fb1af676912b9e366d92c417eb1db7fbf7d # Parent 65870d42a7b1ed3a74816c32f651304fe65764d2 mod_profile: Obsolete. Remove. Redirect to mod_vcard_legacy diff -r 65870d42a7b1 -r 89226fb1af67 mod_profile/README.markdown --- a/mod_profile/README.markdown Sun May 29 02:03:41 2022 +0200 +++ b/mod_profile/README.markdown Mon May 30 16:14:51 2022 +0200 @@ -1,7 +1,8 @@ --- labels: -- 'Stage-Unmaintained' +- 'Stage-Obsolete' summary: 'Replacement for mod\_vcard with vcard4 support and PEP integration' +superseded_by: mod_vcard_legacy --- ::: {.alert .alert-warning} diff -r 65870d42a7b1 -r 89226fb1af67 mod_profile/mod_profile.lua --- a/mod_profile/mod_profile.lua Sun May 29 02:03:41 2022 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,265 +0,0 @@ --- mod_profile --- Copyright (C) 2014-2018 Kim Alvefur --- --- This file is MIT licensed. - -local st = require"util.stanza"; -local jid_split = require"util.jid".split; -local jid_bare = require"util.jid".bare; -local is_admin = require"core.usermanager".is_admin; -local vcard = require"util.vcard"; -local base64 = require"util.encodings".base64; -local sha1 = require"util.hashes".sha1; -local t_insert, t_remove = table.insert, table.remove; - -local pep_plus; -if module:get_host_type() == "local" and module:get_option_boolean("vcard_to_pep", true) then - pep_plus = module:depends"pep"; - assert(pep_plus.get_pep_service, "Wrong version of mod_pep loaded, you need to update Prosody"); -end - -local storage = module:open_store(); -local legacy_storage = module:open_store("vcard"); - -module:hook("account-disco-info", function (event) - event.reply:tag("feature", { var = "urn:xmpp:pep-vcard-conversion:0" }):up(); -end); - -local function get_item(vcard, name) -- luacheck: ignore 431 - local item; - for i=1, #vcard do - item=vcard[i]; - if item.name == name then - return item, i; - end - end -end - -local magic_mime = { - ["\137PNG\r\n\026\n"] = "image/png"; - ["\255\216"] = "image/jpeg"; - ["GIF87a"] = "image/gif"; - ["GIF89a"] = "image/gif"; - ["