26 lines
927 B
Java
26 lines
927 B
Java
/*
|
|
* 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;
|
|
import cn.wildfirechat.proto.WFCMessage;
|
|
import io.moquette.spi.impl.Qos1PublishHandler;
|
|
import io.netty.buffer.ByteBuf;
|
|
import cn.wildfirechat.common.ErrorCode;
|
|
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) {
|
|
return m_messagesStore.handleJoinChatroom(fromUser, clientID, request.getId());
|
|
}
|
|
}
|