Skip to content

feat: add user.updated handler#87

Merged
arnautov-anton merged 3 commits intomainfrom
feat/handle-user-updated
Aug 4, 2025
Merged

feat: add user.updated handler#87
arnautov-anton merged 3 commits intomainfrom
feat/handle-user-updated

Conversation

@arnautov-anton
Copy link
Contributor

🎫 Ticket: https://linear.app/stream/issue/REACT-512

💡 Overview

  • introduced identical folder structure for the feeds-client (as in feed)
  • added client-level user.updated handler

@szuperaz
Copy link
Contributor

If you have the time, can you please add tests as well? Unit and integration as well?

@arnautov-anton arnautov-anton force-pushed the feat/handle-user-updated branch from 156a862 to 043598b Compare July 31, 2025 08:11
import type { EventPayload } from '../../../types-internal';
import type { FeedsClient, FeedsClientState } from '../../feeds-client';

export function handleUserUpdated(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick

Suggested change
export function handleUserUpdated(
export handleUserUpdated = (
this: FeedsClient,
event: EventPayload<'user.updated'>,
) =>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this acts differently in arrow-type functions, not sure whether that would work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn’t need to bind it then, that’s the only thing that should be different I think - but I might be wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not using this format then you would not able to access protected properties of the FeedsClient (if we ever need them). I'm just repeating the pattern established for the handlers in Feed.

Copy link
Contributor

@isekovanic isekovanic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@arnautov-anton arnautov-anton force-pushed the feat/handle-user-updated branch from ddeb0a3 to 2cd2213 Compare August 4, 2025 15:22
@arnautov-anton arnautov-anton merged commit bc7778d into main Aug 4, 2025
3 checks passed
@arnautov-anton arnautov-anton deleted the feat/handle-user-updated branch August 4, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants