diff mod_debug_omemo/mod_debug_omemo.lua @ 4687:41ddb782320c

mod_debug_omemo: Improve no keys/devices cases
author Matthew Wild <mwild1@gmail.com>
date Mon, 13 Sep 2021 21:10:50 +0100
parents 76af816739f3
children ecfffbbcbf42
line wrap: on
line diff
--- a/mod_debug_omemo/mod_debug_omemo.lua	Mon Sep 13 21:47:01 2021 +0200
+++ b/mod_debug_omemo/mod_debug_omemo.lua	Mon Sep 13 21:10:50 2021 +0100
@@ -159,6 +159,8 @@
 		type = message.attr.type or "normal";
 		direction = direction;
 		encryption = is_encrypted and "encrypted" or "unencrypted";
+		has_any_keys = not message_rids:empty();
+		has_no_keys = message_rids:empty();
 	};
 
 	data.omemo = {
@@ -176,7 +178,7 @@
 			};
 		end
 	else
-		data.omemo.devices[false] = { status = "No devices", };
+		data.omemo.devices[false] = { status = "No devices have published OMEMO keys on this account" };
 	end
 
 	event.response.headers.content_type = "text/html; charset=utf-8";