Hide comments on your publications
This Request is Protected by Authentication
The endpoints listed in this page allow you to hide comments made on your publications. Keep in mind that this is a opt-in, centralized feature (no reflection on-chain) and the actual user experience is depending on the Lens app your audience is using. This means that apps which choose to provide a more curated experience to content creators will need to explicitly enable this feature for it to have any effect.
HideComment
As an authenticated user that made a commentable publication (Post or Quote), you can call the following to hide a comment made under that publication.
Invocation
TODO
mutation HideComment($request: HideCommentRequest!) {
result: hideComment(request: $request)
}
{
for: "0x01-0x01"
}
Returns a Void
. If the given comment is already hidden, does nothing.
UnhideComment
As an authenticated user that made a commentable publication (Post or Quote), you can call the following to unhide a comment you already hidden.
Invocation
TODO
mutation UnhideComment($request: UnhideCommentRequest!) {
result: unhideComment(request: $request)
}
{
for: "0x01-0x01"
}
Returns a Void
. If the given comment is not hidden, does nothing.
Omitting hidden comments when fetching publications
When fetching comments on a publication, you can now add the property showHiddenComments: false
on the PublicationCommentOn object to remove hidden comments from the results. This new field is optional and defaults to true, so the user experience stays the same for any app that chooses to not integrate this.
query Publications($request: PublicationsRequest!) {
publications(request: $request) {
items {
... on Comment {
id
}
}
}
}
{
"request": {
"where": {
"commentOn": {
"id": "0x01-0x01",
"showHiddenComments": false
}
}
}
}
Updated 3 months ago