Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 10044:4fd27023224a
mod_admin_telnet: Collect array from Bosh connections when appending to connection list
Fixes #1356
author | Michel Le Bihan <michel@lebihan.pl> |
---|---|
date | Mon, 03 Jun 2019 20:51:15 +0200 |
parent | 9989:026f9594f661 |
child | 10067:598befab492e |
comparison
equal
deleted
inserted
replaced
10043:ce8e18f20693 | 10044:4fd27023224a |
---|---|
595 return jid_join("["..ip.."]:"..clientport, session.host or "["..serverip.."]:"..serverport); | 595 return jid_join("["..ip.."]:"..clientport, session.host or "["..serverip.."]:"..serverport); |
596 end | 596 end |
597 | 597 |
598 local function show_c2s(callback) | 598 local function show_c2s(callback) |
599 local c2s = array.collect(values(module:shared"/*/c2s/sessions")); | 599 local c2s = array.collect(values(module:shared"/*/c2s/sessions")); |
600 c2s:append(values(module:shared"/*/bosh/sessions")); | 600 c2s:append(array.collect(values(module:shared"/*/bosh/sessions"))); |
601 c2s:sort(function(a, b) | 601 c2s:sort(function(a, b) |
602 if a.host == b.host then | 602 if a.host == b.host then |
603 if a.username == b.username then | 603 if a.username == b.username then |
604 return (a.resource or "") > (b.resource or ""); | 604 return (a.resource or "") > (b.resource or ""); |
605 end | 605 end |