# HG changeset patch
# User daurnimator <quae@daurnimator.com>
# Date 1396549386 14400
# Node ID 95bddf0142f428016a06991966a54e8cb272a0fa
# Parent  b82523f92b06426e11232de43a062a6bc43f1ca4
plugins/muc/muc.lib: Remember to coerce nil role to "none"

diff -r b82523f92b06 -r 95bddf0142f4 plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Thu Apr 03 12:44:27 2014 -0400
+++ b/plugins/muc/muc.lib.lua	Thu Apr 03 14:23:06 2014 -0400
@@ -163,10 +163,11 @@
 	x:up();
 	return x
 end
+
 -- actor is (real) jid
 function room_mt:build_item_list(occupant, x, is_anonymous, nick, actor, reason)
-	local affiliation = self:get_affiliation(occupant.bare_jid);
-	local role = occupant.role;
+	local affiliation = self:get_affiliation(occupant.bare_jid) or "none";
+	local role = occupant.role or "none";
 	local actor_attr;
 	if actor then
 		actor_attr = {nick = select(3,jid_split(self:get_occupant_jid(actor)))};