lens-protocol / api-examples

Code examples of how to speak to the Lens API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include timestamp in FollowNotification

iPaulPro opened this issue · comments

Problem

FollowNotification returns an array of profiles that followed, but no timestamps for the follow events. The other batched notifications, ReactionNotification and ActedNotification, both include timestamps for the respective events.

Right now it's not possible to do something like query for the number of followers gained in the past 24 hours.

export type OpenActionProfileActedFragment = {
    actedAt: string;
    by: ProfileFragment;
    action: OpenActionResult_KnownCollectOpenActionResult_Fragment | OpenActionResult_UnknownOpenActionResult_Fragment;
};
export type ActedNotificationFragment = {
    __typename: 'ActedNotification';
    id: string;
    actions: Array<OpenActionProfileActedFragment>;
    publication: CommentFragment | MirrorFragment | PostFragment | QuoteFragment;
};
export type FollowNotificationFragment = {
    __typename: 'FollowNotification';
    id: string;
    followers: Array<ProfileFragment>;
};

Proposed solution

Follow the pattern of other batched notifications and include the timestamp of follows.

export type FollowNotificationFragment = {
    __typename: 'FollowNotification';
    id: string;
    follows: Array<{
        follower: ProfileFragment;
        followedAt: string;
    }>
};

Can we at least expect this in Lens V3? Any response would be appreciated.