Software /
code /
prosody
Comparison
util/pubsub.lua @ 9206:33ee40dc3e25
Pubsub: Add tests for :get_last_item() and fix for non-persistent nodes
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 18 Aug 2018 15:10:41 +0100 |
parent | 9204:c5a81acc1fc3 |
child | 9207:76d593b35958 |
comparison
equal
deleted
inserted
replaced
9205:2e710b618440 | 9206:33ee40dc3e25 |
---|---|
602 if not self.nodes[node] then | 602 if not self.nodes[node] then |
603 return false, "item-not-found"; | 603 return false, "item-not-found"; |
604 end | 604 end |
605 | 605 |
606 -- Returns success, id, item | 606 -- Returns success, id, item |
607 return true, self.data[node]:tail(); | 607 return true, self.data[node]:head(); |
608 end | 608 end |
609 | 609 |
610 function service:get_nodes(actor) | 610 function service:get_nodes(actor) |
611 -- Access checking | 611 -- Access checking |
612 if not self:may(nil, actor, "get_nodes") then | 612 if not self:may(nil, actor, "get_nodes") then |