From f2411aea1537a1aaa94e50e3628790cd4cf01ca9 Mon Sep 17 00:00:00 2001 From: Andy Zhang <37402126+AnzhiZhang@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:13:46 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A9=B9=20add=20null=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zhanganzhi/chathub/platforms/qq/QQAdaptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,