changeset 6497:3b0cfef7fabe

mod_report_affiliations: Don't report 0 trust when we just didn't calculate it Absent 'trust' means "I don't have it" or "I don't want to expose it" trust='0' means "I don't trust this account at all"
author Matthew Wild <mwild1@gmail.com>
date Wed, 25 Mar 2026 10:23:52 +0000
parents 5a01db53d680
children 4226e6aadbd8
files mod_report_affiliations/mod_report_affiliations.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_report_affiliations/mod_report_affiliations.lua	Wed Mar 25 09:47:22 2026 +0000
+++ b/mod_report_affiliations/mod_report_affiliations.lua	Wed Mar 25 10:23:52 2026 +0000
@@ -91,7 +91,7 @@
 	return st.stanza("info", {
 		affiliation = account_type;
 		since = since and dt.datetime(since - (since%86400)) or nil;
-		trust = ("%d"):format(trust or 0);
+		trust = trust and ("%d"):format(trust) or nil;
 		xmlns = xmlns_aff;
 	});
 end