Software /
code /
prosody
Comparison
core/rostermanager.lua @ 7064:b98006bfd97a
rostermanager: Rename variable to avoid name clash [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 09 Jan 2016 15:18:46 +0100 |
parent | 6787:ad64e2eacd0e |
child | 7154:b3b92204802f |
comparison
equal
deleted
inserted
replaced
7062:90e8bbfbaabd | 7064:b98006bfd97a |
---|---|
298 local item = roster[jid]; | 298 local item = roster[jid]; |
299 local pending = is_contact_pending_in(username, host, jid); | 299 local pending = is_contact_pending_in(username, host, jid); |
300 if pending then | 300 if pending then |
301 roster[false].pending[jid] = nil; | 301 roster[false].pending[jid] = nil; |
302 end | 302 end |
303 local subscribed; | 303 local is_subscribed; |
304 if item then | 304 if item then |
305 if item.subscription == "from" then | 305 if item.subscription == "from" then |
306 item.subscription = "none"; | 306 item.subscription = "none"; |
307 subscribed = true; | 307 is_subscribed = true; |
308 elseif item.subscription == "both" then | 308 elseif item.subscription == "both" then |
309 item.subscription = "to"; | 309 item.subscription = "to"; |
310 subscribed = true; | 310 is_subscribed = true; |
311 end | 311 end |
312 end | 312 end |
313 local success = (pending or subscribed) and save_roster(username, host, roster); | 313 local success = (pending or is_subscribed) and save_roster(username, host, roster); |
314 return success, pending, subscribed; | 314 return success, pending, subscribed; |
315 end | 315 end |
316 | 316 |
317 local function process_outbound_subscription_request(username, host, jid) | 317 local function process_outbound_subscription_request(username, host, jid) |
318 local roster = load_roster(username, host); | 318 local roster = load_roster(username, host); |