stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
19 lines (17 loc) • 436 B
text/typescript
import { fromPartial } from '@total-typescript/shoehorn';
import type { ChannelResponse, Event, StreamChat, UserResponse } from 'stream-chat';
export default (
client: StreamChat,
user: Partial<UserResponse> = {},
channel: Partial<ChannelResponse> = {},
) => {
client.dispatchEvent(
fromPartial<Event>({
channel,
cid: channel.cid,
type: 'typing.start',
user,
user_id: user.id,
}),
);
};