# HG changeset patch # User Kim Alvefur # Date 1527664113 -7200 # Node ID c271bfa3d6252c98d267840e22122d0b5aa492c3 # Parent e1db146984a0529bdb8b3afabaf09e58c4b562ca mod_muc_intercom: Fix to use correct name for variable diff -r e1db146984a0 -r c271bfa3d625 mod_muc_intercom/mod_muc_intercom.lua --- a/mod_muc_intercom/mod_muc_intercom.lua Wed May 30 08:40:59 2018 +0200 +++ b/mod_muc_intercom/mod_muc_intercom.lua Wed May 30 09:08:33 2018 +0200 @@ -6,9 +6,9 @@ local jid = require "util.jid"; local now = require "util.datetime".datetime; -local function get_room_by_jid(mod_muc, jid) - if mod_muc.get_room_by_jid then - return mod_muc.get_room_by_jid(jid); +local function get_room_from_jid(mod_muc, jid) + if mod_muc.get_room_from_jid then + return mod_muc.get_room_from_jid(jid); elseif mod_muc.rooms then return mod_muc.rooms[jid]; -- COMPAT 0.9, 0.10 end @@ -19,7 +19,7 @@ local mod_muc = host_session.muc; if not mod_muc then return; end - local this_room = get_room_by_jid(mod_muc, stanza.attr.to); + local this_room = get_room_from_jid(mod_muc, stanza.attr.to); if not this_room then return; end -- no such room local from_room_jid = this_room._jid_nick[stanza.attr.from]; @@ -37,7 +37,7 @@ module:log("debug", "target room is %s", target_room); local bare_room = jid.join(target_room, from_host); - local dest_room = get_room_by_jid(mod_muc, bare_room); + local dest_room = get_room_from_jid(mod_muc, bare_room); if not dest_room then return; end -- TODO send a error module:log("info", "message from %s in %s to %s", from_nick, from_room, target_room);