我正在使用libary:https://github.com/messenger4j/messenger4j。
当我从机器人收到MessageEchoEvent
的消息时,问题是我无法仅接收某些ID的消息。
是否可以选择从漫游器获取消息而不是ID?
我有这种方法来处理消息回显事件:
private void handleMessageEchoEvent(final MessageEchoEvent event) {
logger.debug("Handling MessageEchoEvent");
final String senderId = event.senderId();
logger.debug("senderId: {}", senderId);
final String recipientId = event.recipientId();
logger.debug("recipientId: {}", recipientId);
final String messageId = event.messageId();
logger.debug("messageId: {}", messageId);
final Instant timestamp = event.timestamp();
logger.debug("timestamp: {}", timestamp);
logger.info("Received echo for message '{}' that has been sent to recipient '{}' by sender '{}' at '{}'", messageId, recipientId,
senderId, timestamp);
}
我想获取消息并对其进行处理。有什么建议吗?