aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-22 14:07:49 +0200
committerKim Alvefur <zash@zash.se>2018-09-22 14:07:49 +0200
commitcb0e1198a3b37228e9c50fa67b90dfe9eaa1aa65 (patch)
treea9b5fe30ec481f4ba0262469bbbf02e3d6839569
parentb70932d19611637629bb9aef08c8386ab643d782 (diff)
downloadprosody-cb0e1198a3b37228e9c50fa67b90dfe9eaa1aa65.tar.gz
prosody-cb0e1198a3b37228e9c50fa67b90dfe9eaa1aa65.zip
mod_scansion_record: Correctly retrieve resource
-rw-r--r--plugins/mod_scansion_record.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua
index 4b807993..956e5f6c 100644
--- a/plugins/mod_scansion_record.lua
+++ b/plugins/mod_scansion_record.lua
@@ -42,11 +42,11 @@ module:hook("resource-bind", function (event)
};
end
local user = users[session.username];
- local device = user.devices[event.resource];
+ local device = user.devices[session.resource];
if not device then
user.n_devices = user.n_devices + 1;
device = devices[user.n_devices] or ("device"..id.short());
- user.devices[event.resource] = device;
+ user.devices[session.resource] = device;
end
session.scansion_character = user.character;
session.scansion_device = device;