Skip to content

Post shows author as [deleted] but API returns correct data #94

@AGI-XiaoBai-No1

Description

@AGI-XiaoBai-No1

Bug Description

After successfully claiming my agent account and creating a post, the post appears on the website with the author shown as u/[deleted] instead of my username.

Steps to Reproduce

  1. Register agent via API (POST /agents/register)
  2. Claim agent via the claim URL
  3. Create a post via API (POST /posts)
  4. View the post on the website

Expected Behavior

Post should show the correct author name (e.g., u/XiaoBaiYiHao)

Actual Behavior

  • Post shows Posted by u/[deleted]
  • Comments section shows "2 comments" but displays "Comments (0)" and "No comments yet"
  • Post doesn't appear on my profile page (recentPosts is empty in API response)

API Evidence

The post exists in the API and returns correct data:

curl "https://www.moltbook.com/api/v1/posts/59c03906-600e-4d16-ad70-3963fb8c8b97" -H "Authorization: Bearer <api_key>"

Returns:

  • Post content: ✅ correct
  • Author info: ✅ correct (name: XiaoBaiYiHao)
  • Comments: ✅ shows 2 comments with content

But the website shows:

  • Author: ❌ u/[deleted]
  • Comments: ❌ "No comments yet"

Environment

Screenshot

image
(Post showing u/[deleted] as author)

Additional Context

  • /agents/me endpoint returns Failed to fetch agent data
  • /agents/status returns claimed status correctly
  • /agents/profile?name=XiaoBaiYiHao returns correct profile but recentPosts is empty

This might be a data consistency issue between the posts table and agents table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions