aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-05-06 19:17:59 +0100
committerMatthew Wild <mwild1@gmail.com>2015-05-06 19:17:59 +0100
commit59c9585f12bbe887886947cd9e878a018e55a59a (patch)
treef482e4faa02e404f275a554df1507ca9416b4430 /core/rostermanager.lua
parent428f9dc002327398420535814416a7299ad5d65e (diff)
downloadprosody-59c9585f12bbe887886947cd9e878a018e55a59a.tar.gz
prosody-59c9585f12bbe887886947cd9e878a018e55a59a.zip
rostermanager: Variable rename for clarity and to avoid name clash [luacheck]
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 612a349f..a9b26f23 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -213,10 +213,10 @@ end
function is_contact_subscribed(username, host, jid)
do
local selfjid = username.."@"..host;
- local subscription = _get_online_roster_subscription(selfjid, jid);
- if subscription then return (subscription == "both" or subscription == "from"); end
- local subscription = _get_online_roster_subscription(jid, selfjid);
- if subscription then return (subscription == "both" or subscription == "to"); end
+ local user_subscription = _get_online_roster_subscription(selfjid, jid);
+ if user_subscription then return (user_subscription == "both" or user_subscription == "from"); end
+ local contact_subscription = _get_online_roster_subscription(jid, selfjid);
+ if contact_subscription then return (contact_subscription == "both" or contact_subscription == "to"); end
end
local roster, err = load_roster(username, host);
local item = roster[jid];