Skip to content

Commit 744c30c

Browse files
committed
fix: pr review comments
1 parent e5afc43 commit 744c30c

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

package/src/components/Message/Message.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,40 @@ export type TouchableEmitter =
5656
| 'messageReplies'
5757
| 'reactionList';
5858

59+
export type TextMentionTouchableHandlerAdditionalInfo<
60+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
61+
> = { user?: UserResponse<StreamChatGenerics> };
62+
5963
export type TextMentionTouchableHandlerPayload<
6064
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
6165
> = {
6266
emitter: 'textMention';
63-
additionalInfo?: { user?: UserResponse<StreamChatGenerics> };
67+
additionalInfo?: TextMentionTouchableHandlerAdditionalInfo<StreamChatGenerics>;
6468
};
6569

70+
export type UrlTouchableHandlerAdditionalInfo = { url?: string };
71+
6672
export type UrlTouchableHandlerPayload = {
6773
emitter: 'textLink' | 'card';
68-
additionalInfo?: { url?: string };
74+
additionalInfo?: UrlTouchableHandlerAdditionalInfo;
6975
};
7076

77+
export type FileAttachmentTouchableHandlerAdditionalInfo<
78+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
79+
> = { attachment?: Attachment<StreamChatGenerics> };
80+
7181
export type FileAttachmentTouchableHandlerPayload<
7282
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
7383
> = {
7484
emitter: 'fileAttachment';
75-
additionalInfo?: { attachment?: Attachment<StreamChatGenerics> };
85+
additionalInfo?: FileAttachmentTouchableHandlerAdditionalInfo<StreamChatGenerics>;
7686
};
7787

88+
export type GalleryThumbnailTouchableHandlerAdditionalInfo = { thumbnail?: Thumbnail };
89+
7890
export type GalleryThumbnailTouchableHandlerPayload = {
7991
emitter: 'gallery';
80-
additionalInfo?: { thumbnail?: Thumbnail };
92+
additionalInfo?: GalleryThumbnailTouchableHandlerAdditionalInfo;
8193
};
8294

8395
export type PressableHandlerPayload = {

0 commit comments

Comments
 (0)