Skip to content

Commit

Permalink
What
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Oct 30, 2024
1 parent 8efcb88 commit fbc48ee
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 @@ -930,8 +930,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 fbc48ee

Please sign in to comment.