Provide Feedback
This guide will show you tools for users to provide account related feedback on Lens.
Report an Account
Users can report an Account if they find it inappropriate or offensive. Reporting an Account will help Lens ML algorithms to improve over time.
Users can chose between the following reasons:
AccountReportReason
enum AccountReportReason { IMPERSONATION REPETITIVE_SPAM OTHER}
You MUST be authenticated as Account Owner or Account Manager to make this request.
- TypeScript
- GraphQL
- React
Use the reportAccount action to report an account on Lens.
Report Account
import { evmAddress, AccountReportReason, postId } from "@lens-protocol/client";import { reportAccount } from "@lens-protocol/client/actions";
const result = await reportAccount(sessionClient, { report: AccountReportReason.REPETITIVE_SPAM, account: evmAddress("0x123"), additionalComment: "This account is a spammer!" // optional referencedPosts: [postId("42"), postId("43")] // optional});
if (result.isErr()) { return console.error(result.error);}
That's it—you've successfully reported an account on Lens!
Recommend an Account
Users have the ability to recommend an account if they think it's a good fit for the Lens community. The Lens ML algorithms will use this feedback to improve the user's feed.
You MUST be authenticated as Account Owner or Account Manager to make these requests.
- TypeScript
- GraphQL
- React
Use the recommendAccount action to recommend an account.
Recommend Account
import { evmAddress } from "@lens-protocol/client";import { recommendAccount } from "@lens-protocol/client/actions";
const result = await recommendAccount(sessionClient, { account: evmAddress("0x123"),});
if (result.isErr()) { return console.error(result.error);}
Use the undoRecommendAccount action to dismiss a recommended account.
Undo Recommended Account
import { evmAddress } from "@lens-protocol/client";import { undoRecommendAccount } from "@lens-protocol/client/actions";
const result = await undoRecommendAccount(sessionClient, { account: evmAddress("0x123"),});
if (result.isErr()) { return console.error(result.error);}