Comparison

mod_groups_internal/mod_groups_internal.lua @ 5843:742142f9771e

mod_groups_internal: Fix traceback when room doesn't exist I'm not sure if it should even be included if it doesn't exist, but I'm not currently sure how this situation occurs, so I'm implementing the lightest possible fix for now.
author Matthew Wild <mwild1@gmail.com>
date Thu, 11 Jan 2024 15:53:18 +0000
parent 5823:8566a423da88
child 5844:c9279845fc41
comparison
equal deleted inserted replaced
5842:bb51cf204dd4 5843:742142f9771e
420 if group_info.muc_jid then 420 if group_info.muc_jid then
421 table.insert(mucs, group_info.muc_jid); 421 table.insert(mucs, group_info.muc_jid);
422 end 422 end
423 423
424 return array.map(mucs, function (muc_jid) 424 return array.map(mucs, function (muc_jid)
425 local room = muc_host.get_room_from_jid(muc_jid);
425 return { 426 return {
426 id = jid.node(muc_jid); 427 id = jid.node(muc_jid);
427 jid = muc_jid; 428 jid = muc_jid;
428 name = muc_host.get_room_from_jid(muc_jid):get_name() or group_info.name; 429 name = room and room:get_name() or group_info.name;
429 }; 430 };
430 end); 431 end);
431 end 432 end
432 433
433 function emit_member_events(group_id) 434 function emit_member_events(group_id)