Skip to content

🛠️ Bug: Comments by Users Without Profiles Not Returned in get-notifications or get-single-post #736

Open
@brootle

Description

@brootle

🛠️ Bug: Comments by Users Without Profiles Not Returned in get-notifications or get-single-post

❗️ Summary

When a user without a profile comments on a post, their comment:

  • Is not returned in get-notifications under PostsByHash — instead, null is returned for that hash.
  • Is not included in the Comments[] array from get-single-post — despite CommentCount being correct.

This is a regression or related issue to [#725](#725), which was previously fixed for get-single-post, but similar filtering is still affecting notifications and comments.


↻ Affected Endpoints

1. POST /api/v0/get-notifications

  • Payload:

    {
      "FetchStartIndex": -1,
      "NumToFetch": 50,
      "PublicKeyBase58Check": "BC1YLiLSarrfBrvKb776jEH9jgZVAwD8KSaqBz8TDg4hhrVAsxYxgbp"
    }
  • Observed Response:

    PostsByHash["bb9fb4bbb241..."] = null

    "PostsByHash": {
      "bb9fb4bbb24143071536f234308c9afed957d5fbddad6590fff007a012ac2e78": null
    }

    ❌ Expected: A valid Post object for that comment, even if the poster has no profile.


2. POST /api/v0/get-single-post

  • Payload:

    {
      "PostHashHex": "e4c7f438d9705fa8bf1b5a41889edef726c69ce4f063284047066a9a84fe3da1",
      "CommentOffset": 0,
      "CommentLimit": 10
    }
  • Observed Response:

    • CommentCount = 2
    • Only 1 comment is returned, the one from a user with a profile.

    ❌ Expected: All comments should be returned, regardless of profile status.


🧪 Example of Missing Comment Post

Post hash of missing comment:

bb9fb4bbb24143071536f234308c9afed957d5fbddad6590fff007a012ac2e78

PostsByHash shows:

"bb9fb4bbb24143071536f234308c9afed957d5fbddad6590fff007a012ac2e78": null

✅ Desired Behavior

  • Comments from users without profiles should not be excluded or replaced with null.
  • Their content still exists on chain and is visible via GraphQL and custom indexers.
  • Same treatment should be applied across all endpoints to ensure consistency and frontend stability.

↻ Related Fix

This may be related to logic previously found here:

// If the profile that posted this post does not have a profile, return with error.

// If the profile that posted this post does not have a profile, return with error.
if pubKeyToProfileEntryResponseMap[posterPkMapKey] == nil {
  return nil, fmt.Errorf("GetSinglePostComments: The profile that posted this post does not have a profile.")
}

Although this check was fixed in a previous commit, it seems a similar profile check still silently blocks comments and post hashes elsewhere (notifications, nested post fetches, etc.).


💥 Impact

  • Breaks comment and notification feeds in apps like BitClout, Diamond, and other DeSo-based frontends.
  • Inconsistent behavior across API endpoints.
  • Fails silently with null values or missing data, causing broken UIs.

📸 Screenshots

  1. get-notifications response showing null for a post hash
    Image

  2. get-single-post shows correct CommentCount, but omits comments from users without profiles
    Image


🙏 Thank you

This issue may seem edge-case but directly affects frontend reliability. Thanks in advance for reviewing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions