Diff

plugins/mod_groups.lua @ 5417:d13ec6622752

mod_groups: Add a public function other modules can use to determine if a JID belongs to a given group
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Apr 2013 13:40:29 +0100
parent 5373:9e6d6cdf0449
child 5418:7f270fbf3361
line wrap: on
line diff
--- a/plugins/mod_groups.lua	Wed Apr 03 13:39:41 2013 +0100
+++ b/plugins/mod_groups.lua	Wed Apr 03 13:40:29 2013 +0100
@@ -121,3 +121,8 @@
 function module.unload()
 	datamanager.remove_callback(remove_virtual_contacts);
 end
+
+-- Public for other modules to access
+function group_contains(group_name, jid)
+	return groups[group_name][jid];
+end