Skip to content

Commit

Permalink
What
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Nov 28, 2024
1 parent 2d75575 commit 680d19a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,9 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
set.add(factory);

return () => {
// @ts-expect-error
set.delete(factory);

// @ts-expect-error
if (!set.size) {
this.targetFactoriesByType.delete(eventType);
}
Expand Down
2 changes: 2 additions & 0 deletions src/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ export type ThreadReadState<SCG extends ExtendableGenerics = DefaultGenerics> =
>;

// TODO: figure out generics here
// @ts-expect-error
const messageNewFactory: TargetFactory<DefaultGenerics, 'message.new'> = (event) => {
return event.parent_id ? `message.new-${event.parent_id}` : null;
};
// @ts-expect-error
const threadMessageReadFactory: TargetFactory<DefaultGenerics, 'message.read'> = (event) => {
return event.thread ? `message.read-${event.thread.parent_message_id}` : null;
};
Expand Down

0 comments on commit 680d19a

Please sign in to comment.