98 |
98 |
99 -- Required XMPP features |
99 -- Required XMPP features |
100 self:add_plugin("tls"); |
100 self:add_plugin("tls"); |
101 self:add_plugin("sasl"); |
101 self:add_plugin("sasl"); |
102 self:add_plugin("bind"); |
102 self:add_plugin("bind"); |
103 self:add_plugin("session"); |
|
104 |
103 |
105 function self.data(conn, data) |
104 function self.data(conn, data) |
106 local ok, err = self.stream:feed(data); |
105 local ok, err = self.stream:feed(data); |
107 if ok then return; end |
106 if ok then return; end |
108 self:debug("Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " ")); |
107 self:debug("Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " ")); |