Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 6111:f8b94903be52
plugins/muc: Provide a reasonable default `route_stanza`
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 19 Mar 2014 12:03:15 -0400 |
parent | 6108:aae7bc9d6e93 |
child | 6112:819e00a86239 |
comparison
equal
deleted
inserted
replaced
6110:d007b3c49078 | 6111:f8b94903be52 |
---|---|
1143 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); | 1143 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); |
1144 end | 1144 end |
1145 end | 1145 end |
1146 end | 1146 end |
1147 | 1147 |
1148 function room_mt:route_stanza(stanza) end -- Replace with a routing function, e.g., function(room, stanza) core_route_stanza(origin, stanza); end | 1148 function room_mt:route_stanza(stanza) |
1149 module:send(stanza) | |
1150 end | |
1149 | 1151 |
1150 function room_mt:get_affiliation(jid) | 1152 function room_mt:get_affiliation(jid) |
1151 local node, host, resource = jid_split(jid); | 1153 local node, host, resource = jid_split(jid); |
1152 local bare = node and node.."@"..host or host; | 1154 local bare = node and node.."@"..host or host; |
1153 local result = self._affiliations[bare]; -- Affiliations are granted, revoked, and maintained based on the user's bare JID. | 1155 local result = self._affiliations[bare]; -- Affiliations are granted, revoked, and maintained based on the user's bare JID. |