fix: add ok checks for sync.Map LoadAndDelete/Load type assertions

This commit is contained in:
程智超0668000959
2026-06-06 21:16:55 +08:00
parent ff7c92deee
commit 5f0d368995
3 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -746,8 +746,8 @@ func (c *FeishuChannel) isBotMentioned(message *larkim.EventMessage) bool {
return false
}
knownID, _ := c.botOpenID.Load().(string)
if knownID == "" {
knownID, ok := c.botOpenID.Load().(string)
if !ok || knownID == "" {
logger.DebugCF("feishu", "Bot open_id unknown, cannot detect @mention", nil)
return false
}