Skip to content

Commit c8de229

Browse files
authored
Update location check to handle None values
1 parent 3fe2b4c commit c8de229

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

astrbot/core/pipeline/respond/stage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class RespondStage(Stage):
3838
Comp.Share: lambda comp: bool(comp.url) or bool(comp.title),
3939
Comp.Music: lambda comp: (comp.id and comp.type and comp.type != 'custom') or (comp.type == 'custom' and comp.url and comp.audio and comp.title), # 音乐分享
4040
Comp.Forward: lambda comp: bool(comp.id), # 合并转发
41-
Comp.Location: lambda comp: bool(comp.lat and comp.lon), # 位置
41+
Comp.Location: lambda comp: bool(comp.lat is not None and comp.lon is not None), # 位置
4242
Comp.Contact: lambda comp: bool(comp.type and comp.id), # 推荐好友 or 群
4343
Comp.Shake: lambda _: True, # 窗口抖动(戳一戳)
4444
Comp.Anonymous: lambda _: True, # 匿名发消息

0 commit comments

Comments
 (0)