fix: preserve true message content in raw_content for attachment-only messages

Separate display snippet from raw_content: use actual message.content
for raw_content (which may be empty string) and only use the placeholder
string for the display snippet. This matches the precedent from Task 5's
ping.py where build_ping_embed must never substitute raw_content with a
placeholder, preserving the factual state of whether content was present.
This commit is contained in:
pyr0ball 2026-07-13 14:04:48 -07:00
parent 8d8761a79d
commit d86cfd2d3d

View file

@ -22,14 +22,15 @@ class ManualShareCog(commands.Cog):
if modality is None:
return
content = message.content or "(attachment only — see original message)"
snippet = content if len(content) <= 120 else content[:117] + "..."
raw_content = message.content
display_content = message.content or "(attachment only — see original message)"
snippet = display_content if len(display_content) <= 120 else display_content[:117] + "..."
embed = build_ping_embed(
modality=modality,
sender_id=None,
snippet=snippet,
raw_content=content,
raw_content=raw_content,
captured_at=message.created_at,
)