Files
IM-server-new/broker/src/main/java/io/moquette/imhandler/JoinChatroomHandler.java
T

26 lines
927 B
Java
Raw Normal View History

2019-03-16 17:04:23 +08:00
/*
* This file is part of the Wildfire Chat package.
* (c) Heavyrain2012 <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
package io.moquette.imhandler;
import cn.wildfirechat.proto.ProtoConstants;
2019-03-16 17:04:23 +08:00
import cn.wildfirechat.proto.WFCMessage;
import io.moquette.spi.impl.Qos1PublishHandler;
import io.netty.buffer.ByteBuf;
2019-05-22 20:24:21 +08:00
import cn.wildfirechat.common.ErrorCode;
2019-03-16 17:04:23 +08:00
import win.liyufan.im.IMTopic;
@Handler(IMTopic.JoinChatroomTopic)
public class JoinChatroomHandler extends IMHandler<WFCMessage.IDBuf> {
@Override
public ErrorCode action(ByteBuf ackPayload, String clientID, String fromUser, ProtoConstants.RequestSourceType requestSourceType, WFCMessage.IDBuf request, Qos1PublishHandler.IMCallback callback) {
2019-03-16 17:04:23 +08:00
return m_messagesStore.handleJoinChatroom(fromUser, clientID, request.getId());
}
}