Diff

core/rostermanager.lua @ 3111:826cb5f1859b

rostermanager: Return an error string when subscription test fails due to an error.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 24 May 2010 00:35:08 +0500
parent 3110:7426727548ed
child 3129:125f03db0b1a
line wrap: on
line diff
--- 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)