105 end |
105 end |
106 end |
106 end |
107 return ret; |
107 return ret; |
108 end, -1); |
108 end, -1); |
109 |
109 |
|
110 self:hook("outgoing", function (data) |
|
111 if data.name then |
|
112 self:event("stanza-out", data); |
|
113 end |
|
114 end); |
|
115 |
|
116 self:hook("stanza-out", function (stanza) |
|
117 if not stanza.attr.xmlns then |
|
118 self:event(stanza.name.."-out", stanza); |
|
119 end |
|
120 end); |
|
121 |
110 local function stream_ready() |
122 local function stream_ready() |
111 self:event("ready"); |
123 self:event("ready"); |
112 end |
124 end |
113 self:hook("session-success", stream_ready, -1) |
125 self:hook("session-success", stream_ready, -1) |
114 self:hook("bind-success", stream_ready, -1); |
126 self:hook("bind-success", stream_ready, -1); |