# HG changeset patch # User Matthew Wild # Date 1430936279 -3600 # Node ID 5ef319efedba967e1f0056869ad6d28466527421 # Parent 90e846e8a7880cc2cd4eb93b3def8c0de4c0a18b rostermanager: Variable rename for clarity and to avoid name clash [luacheck] diff -r 90e846e8a788 -r 5ef319efedba core/rostermanager.lua --- a/core/rostermanager.lua Wed May 06 19:16:16 2015 +0100 +++ b/core/rostermanager.lua Wed May 06 19:17:59 2015 +0100 @@ -213,10 +213,10 @@ 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];