diff --git a/src/main/java/com/zhanganzhi/chathub/platforms/qq/QQAdaptor.java b/src/main/java/com/zhanganzhi/chathub/platforms/qq/QQAdaptor.java index 671b101..191b6fb 100644 --- a/src/main/java/com/zhanganzhi/chathub/platforms/qq/QQAdaptor.java +++ b/src/main/java/com/zhanganzhi/chathub/platforms/qq/QQAdaptor.java @@ -97,7 +97,7 @@ public void consumeEvent() { } } String senderCard = curEvent.getSender().getCard(); - String senderName = senderCard.isEmpty() ? curEvent.getSender().getNickname() : senderCard; + String senderName = senderCard == null || senderCard.isEmpty() ? curEvent.getSender().getNickname() : senderCard; String content = String.join(" ", messages); chatHub.getEventHub().onUserChat(new MessageEvent( platform,