rostermanager: Return an error string when subscription test fails due to an error.
--- a/core/rostermanager.lua Mon May 24 00:29:45 2010 +0500
+++ b/core/rostermanager.lua Mon May 24 00:35:08 2010 +0500
@@ -191,9 +191,9 @@
end
function is_contact_subscribed(username, host, jid)
- local roster = load_roster(username, host);
+ local roster, err = load_roster(username, host);
local item = roster[jid];
- return item and (item.subscription == "from" or item.subscription == "both");
+ return item and (item.subscription == "from" or item.subscription == "both"), err;
end
function is_contact_pending_in(username, host, jid)