Changeset

3070:c271bfa3d625

mod_muc_intercom: Fix to use correct name for variable
author Kim Alvefur <zash@zash.se>
date Wed, 30 May 2018 09:08:33 +0200
parents 3069:e1db146984a0
children 3071:b6cac9d72255
files mod_muc_intercom/mod_muc_intercom.lua
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);