aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 83bb379e..7d7fd061 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -135,4 +135,10 @@ function process_inbound_unsubscribe(username, host, jid)
end
end
+function is_contact_subscribed(username, host, jid)
+ local roster = load_roster(username, host);
+ local item = roster[jid];
+ return item and (item.subscription == "from" or item.subscription == "both");
+end
+
return _M; \ No newline at end of file