comparison mod_bookmarks2/mod_bookmarks2.lua @ 4739:fdd9e5d89d73

mod_bookmarks2: Fix comparison The nick and password elements are children of the conference element, rather than the pubsub item element passed to the function.
author Kim Alvefur <zash@zash.se>
date Wed, 03 Nov 2021 21:16:11 +0100
parents 5aee8d86629a
children 7ed2467c9bb5
comparison
equal deleted inserted replaced
4738:5aee8d86629a 4739:fdd9e5d89d73
87 if a == nil or b == nil then 87 if a == nil or b == nil then
88 return false; 88 return false;
89 end 89 end
90 local a_conference = a:get_child("conference", namespace); 90 local a_conference = a:get_child("conference", namespace);
91 local b_conference = b:get_child("conference", namespace); 91 local b_conference = b:get_child("conference", namespace);
92 local a_nick = a:get_child_text("nick", namespace); 92 local a_nick = a_conference:get_child_text("nick");
93 local b_nick = b:get_child_text("nick", namespace); 93 local b_nick = b_conference:get_child_text("nick");
94 local a_password = a:get_child_text("password", namespace); 94 local a_password = a_conference:get_child_text("password");
95 local b_password = b:get_child_text("password", namespace); 95 local b_password = b_conference:get_child_text("password");
96 return (a.attr.id == b.attr.id and 96 return (a.attr.id == b.attr.id and
97 a_conference.attr.name == b_conference.attr.name and 97 a_conference.attr.name == b_conference.attr.name and
98 a_conference.attr.autojoin == b_conference.attr.autojoin and 98 a_conference.attr.autojoin == b_conference.attr.autojoin and
99 a_nick == b_nick and 99 a_nick == b_nick and
100 a_password == b_password); 100 a_password == b_password);