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) • 447 B
text/typescript
import { fromPartial } from '@total-typescript/shoehorn';
import type { ChannelMemberResponse, ChannelResponse, Event, StreamChat } from 'stream-chat';
export default (
client: StreamChat,
member: ChannelMemberResponse,
channel: Partial<ChannelResponse> = {},
) => {
client.dispatchEvent(
fromPartial<Event>({
channel,
cid: channel.cid,
member,
type: 'member.removed',
user: member.user,
}),
);
};