From 9bd8c81c916f22ffb11ce4f11f74edc87002fbb2 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 25 Oct 2008 03:13:10 +0500 Subject: Inbound subscription request --- core/rostermanager.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/rostermanager.lua') 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 -- cgit v1.2.3