Changeset

12016:b7e15abde27f

mod_disco: Advertise anonymous users Can these even be seen?
author Kim Alvefur <zash@zash.se>
date Sat, 04 Jul 2020 20:10:18 +0200
parents 12015:b4db17aeff01
children 12017:b3f040e57835
files plugins/mod_disco.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_disco.lua	Sat Jul 04 20:09:18 2020 +0200
+++ b/plugins/mod_disco.lua	Sat Jul 04 20:10:18 2020 +0200
@@ -184,6 +184,8 @@
 		if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account
 		if um_is_admin(stanza.attr.to or origin.full_jid, module.host) then
 			reply:tag('identity', {category='account', type='admin'}):up();
+		elseif prosody.hosts[module.host].users.name == "anonymous" then
+			reply:tag('identity', {category='account', type='anonymous'}):up();
 		else
 			reply:tag('identity', {category='account', type='registered'}):up();
 		end