Skip to content

Commit 614d222

Browse files
committed
Check if message is empty
1 parent b336b04 commit 614d222

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

shinobu/beacon/protocol/beacon.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,10 @@ async def send(self, author: beacon_member.BeaconMember | beacon_member.BeaconPa
556556
if content.original_platform in self._disabled_platforms:
557557
raise BeaconPlatformDisabled(content.original_platform)
558558

559+
# Ensure content is not empty
560+
if len(content.blocks) == 0 and len(content.files) == 0:
561+
return
562+
559563
# Get group ID
560564
group_id: str = str(uuid.uuid4())
561565

0 commit comments

Comments
 (0)