Class SendPrivateMessageHandler
java.lang.Object
io.github.theword.queqiao.core.protocol.AbstractProtocolHandler<PrivateMessagePayload,PrivateMessageResponse>
io.github.theword.queqiao.core.protocol.handler.SendPrivateMessageHandler
public class SendPrivateMessageHandler
extends AbstractProtocolHandler<PrivateMessagePayload,PrivateMessageResponse>
-
Field Summary
Fields inherited from class io.github.theword.queqiao.core.protocol.AbstractProtocolHandler
handleApiService, logger -
Constructor Summary
ConstructorsConstructorDescriptionSendPrivateMessageHandler(org.slf4j.Logger logger, HandleApiService handleApiService) -
Method Summary
Modifier and TypeMethodDescriptionprotected PrivateMessageResponsehandlePayload(PrivateMessagePayload payload) 处理私聊请求Methods inherited from class io.github.theword.queqiao.core.protocol.AbstractProtocolHandler
handle
-
Constructor Details
-
SendPrivateMessageHandler
-
-
Method Details
-
handlePayload
protected PrivateMessageResponse handlePayload(PrivateMessagePayload payload) throws ProtocolException 处理私聊请求校验规则:
nickname与uuid至少要有一个有效。nickname使用trim()后判空,因此纯空白字符串(如" ")视为未提供。两者同时提供时的优先级由平台实现(
HandleApiService#handleSendPrivateMessage)决定, 本层不做取舍、原样传递——因为只有平台实现才知道本地玩家列表中哪些字段可靠。- Specified by:
handlePayloadin classAbstractProtocolHandler<PrivateMessagePayload,PrivateMessageResponse> - Parameters:
payload- 私聊负载- Returns:
- 平台实现返回的响应
- Throws:
ProtocolException- 目标玩家信息缺失时抛出 400
-