Software /
code /
prosody
Comparison
core/stanza_router.lua @ 160:018c7f5ef0ea
Fix nil concat for good this time (\!)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 24 Oct 2008 15:20:34 +0100 |
parent | 159:d71454f97faf |
child | 168:744fafa8b700 |
child | 170:e7bff9cfbb65 |
comparison
equal
deleted
inserted
replaced
159:d71454f97faf | 160:018c7f5ef0ea |
---|---|
196 pres.attr.to = nil; | 196 pres.attr.to = nil; |
197 pres.attr.from = nil; | 197 pres.attr.from = nil; |
198 end | 198 end |
199 end | 199 end |
200 else | 200 else |
201 send(origin, st.presence({from=user.."@"..host, to=stanza.attr.from, type="unsubscribed"})); | 201 send(origin, st.presence({from=user.."@"..host, to=origin.username.."@"..origin.host, type="unsubscribed"})); |
202 end | 202 end |
203 elseif stanza.attr.type == "subscribe" then | 203 elseif stanza.attr.type == "subscribe" then |
204 -- TODO | 204 -- TODO |
205 elseif stanza.attr.type == "unsubscribe" then | 205 elseif stanza.attr.type == "unsubscribe" then |
206 -- TODO | 206 -- TODO |
250 end | 250 end |
251 else -- user does not exist | 251 else -- user does not exist |
252 -- TODO we would get here for nodeless JIDs too. Do something fun maybe? Echo service? Let plugins use xmpp:server/resource addresses? | 252 -- TODO we would get here for nodeless JIDs too. Do something fun maybe? Echo service? Let plugins use xmpp:server/resource addresses? |
253 if stanza.name == "presence" then | 253 if stanza.name == "presence" then |
254 if stanza.attr.type == "probe" then | 254 if stanza.attr.type == "probe" then |
255 send(origin, st.presence({from = node.."@"..host, to = origin.username.."@"..origin.host, type = "unsubscribed"})); | 255 send(origin, st.presence({from = stanza.attr.to, to = stanza.attr.from, type = "unsubscribed"})); |
256 end | 256 end |
257 -- else ignore | 257 -- else ignore |
258 else | 258 else |
259 send(origin, st.error_reply(stanza, "cancel", "service-unavailable")); | 259 send(origin, st.error_reply(stanza, "cancel", "service-unavailable")); |
260 end | 260 end |