Comparison

plugins/muc/muc.lib.lua @ 8526:f1a46eef9df1

MUC: Treat missing type and type=normal the same
author Kim Alvefur <zash@zash.se>
date Fri, 20 Oct 2017 05:18:58 +0200
parent 8519:e7808f8d7d11
child 8527:0a3dced117f7
comparison
equal deleted inserted replaced
8525:7be8f649d97d 8526:f1a46eef9df1
1126 local type = stanza.attr.type; 1126 local type = stanza.attr.type;
1127 if type == "groupchat" then 1127 if type == "groupchat" then
1128 return self:handle_groupchat_to_room(origin, stanza) 1128 return self:handle_groupchat_to_room(origin, stanza)
1129 elseif type == "error" and is_kickable_error(stanza) then 1129 elseif type == "error" and is_kickable_error(stanza) then
1130 return self:handle_kickable(origin, stanza) 1130 return self:handle_kickable(origin, stanza)
1131 elseif type == nil then 1131 elseif type == nil or type == "normal" then
1132 local x = stanza:get_child("x", "http://jabber.org/protocol/muc#user"); 1132 local x = stanza:get_child("x", "http://jabber.org/protocol/muc#user");
1133 if x then 1133 if x then
1134 local payload = x.tags[1]; 1134 local payload = x.tags[1];
1135 if payload == nil then --luacheck: ignore 542 1135 if payload == nil then --luacheck: ignore 542
1136 -- fallthrough 1136 -- fallthrough