Commit e3373fc5 authored by 姜为's avatar 姜为 Committed by daryl herzmann

fix join room send private packet issue (#660)

when canSendPrivateMessage is null will throw NullPointException

	if use canSendPrivateMessage() method when canSendPrivateMessage
	is null will return "anyone"
parent 29ebef2e
......@@ -1072,11 +1072,11 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
throw new ForbiddenException();
default:
case visitor:
if (canSendPrivateMessage.equals( "participants" )) throw new ForbiddenException();
if (canSendPrivateMessage().equals( "participants" )) throw new ForbiddenException();
case participant:
if (canSendPrivateMessage.equals( "moderators" )) throw new ForbiddenException();
if (canSendPrivateMessage().equals( "moderators" )) throw new ForbiddenException();
case moderator:
if (canSendPrivateMessage.equals( "none" )) throw new ForbiddenException();
if (canSendPrivateMessage().equals( "none" )) throw new ForbiddenException();
}
String resource = packet.getTo().getResource();
List<MUCRole> occupants = occupantsByNickname.get(resource.toLowerCase());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment