Not Interested
Learn how to flag a publication as 'Not Interested'.
The 'Not Interested' feature allows a Profile to flag a publication as not of interest. This information is then picked up by the Lens API ML models to improve the Profile's feeds.
The list of flagged publications is stored off-chain, they are instant to flag and do not require signatures or gas to use.
You must be authenticated with a Profile to use this feature. See Profile Login for more information.
Flag as 'Not Interested'
You can flag a publication as 'Not Interested' using the Lens SDKs or the API. If you change your mind later, you can easily remove this flag.
- React SDK
- JavaScript SDK
- API
The useNotInterestedToggle hook allows you to mark a publication as 'Not Interested'. If the publication is already marked, using this hook will remove the mark.
Available in @lens-protocol/react-web and @lens-protocol/react-native
import { AnyPublication, useNotInterestedToggle } from '@lens-protocol/react-web';
function Publication({ publication }: { publication: AnyPublication }) { const { execute, loading } = useNotInterestedToggle();
const toggle = async () => { await execute({ publication }) };
return ( <button onClick={toggle} disabled={loading}> {publication.operations.isNotInterested ? 'Not interested' : 'Interested'} </button> );}
That's it—you've successfully flagged a publication as 'Not Interested'.
Not Interested Status
To determine if a publication has been flagged as 'Not Interested' by the logged-in profile, use the publication.operations.isNotInterested property.