Skip to content

Commit 98d8b40

Browse files
committed
refactor: remove local type UpdateMessageOptions
1 parent e4ff5e6 commit 98d8b40

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

src/components/Channel/Channel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import type {
2929
SendMessageOptions,
3030
Channel as StreamChannel,
3131
StreamChat,
32+
UpdateMessageOptions,
3233
} from 'stream-chat';
3334

3435
import { initialState, makeChannelReducer } from './channelState';
@@ -83,7 +84,6 @@ import type {
8384
ChannelUnreadUiState,
8485
GiphyVersions,
8586
ImageAttachmentSizeHandler,
86-
UpdateMessageOptions,
8787
VideoAttachmentSizeHandler,
8888
} from '../../types/types';
8989
import {

src/components/Channel/hooks/useEditMessageHandler.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import type { LocalMessage, MessageResponse, StreamChat } from 'stream-chat';
1+
import type {
2+
LocalMessage,
3+
MessageResponse,
4+
StreamChat,
5+
UpdateMessageOptions,
6+
} from 'stream-chat';
27

38
import { useChatContext } from '../../../context/ChatContext';
4-
import type { UpdateMessageOptions } from '../../../types/types';
59

610
type UpdateHandler = (
711
cid: string,

src/context/ChannelActionContext.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ import type {
77
MessageResponse,
88
SendMessageOptions,
99
UpdateMessageAPIResponse,
10+
UpdateMessageOptions,
1011
} from 'stream-chat';
1112

1213
import type { ChannelStateReducerAction } from '../components/Channel/channelState';
1314
import type { CustomMentionHandler } from '../components/Message/hooks/useMentionsHandler';
1415

15-
import type {
16-
ChannelUnreadUiState,
17-
UnknownType,
18-
UpdateMessageOptions,
19-
} from '../types/types';
16+
import type { ChannelUnreadUiState, UnknownType } from '../types/types';
2017

2118
export type MarkReadWrapperOptions = {
2219
/**

src/plugins/Emojis/middleware/textComposerEmojiMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export const createTextComposerEmojiMiddleware = <
114114
input.state.suggestions?.trigger === finalOptions.trigger;
115115
const newInput = { ...input };
116116
if (hasSuggestionsForTrigger && newInput.state.suggestions) {
117-
delete newInput.state.suggestions; // todo: should be delete or just resetState?
117+
delete newInput.state.suggestions;
118118
}
119119
return nextHandler(newInput);
120120
}

src/types/types.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ export type VideoAttachmentSizeHandler = (
110110

111111
export type ChannelUnreadUiState = Omit<ValuesType<StreamChannelState['read']>, 'user'>;
112112

113-
// todo: fix export from stream-chat - for some reason not exported
114-
export type UpdateMessageOptions = {
115-
skip_enrich_url?: boolean;
116-
};
117-
118113
export type Readable<T> = {
119114
[key in keyof T]: T[key];
120115
} & {};

0 commit comments

Comments
 (0)