aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-10-25 03:13:10 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-10-25 03:13:10 +0500
commit9bd8c81c916f22ffb11ce4f11f74edc87002fbb2 (patch)
tree3e16509e770e96dd4eecd3cbf9ac2c4dd7c50979 /core/rostermanager.lua
parent2ab824859d622653d405e8ea0515e3acca9180f4 (diff)
downloadprosody-9bd8c81c916f22ffb11ce4f11f74edc87002fbb2.tar.gz
prosody-9bd8c81c916f22ffb11ce4f11f74edc87002fbb2.zip
Inbound subscription request
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