@linktr.ee/messaging-react 1.12.7 → 1.12.8-rc-1765966726

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "1.12.7",
3
+ "version": "1.12.8-rc-1765966726",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,6 +14,8 @@ import {
14
14
  Window,
15
15
  MessageList,
16
16
  useChannelStateContext,
17
+ WithComponents,
18
+ MessageUIComponentProps,
17
19
  } from 'stream-chat-react'
18
20
 
19
21
  import { useMessagingContext } from '../providers/MessagingProvider'
@@ -22,6 +24,7 @@ import type { ChannelViewProps } from '../types'
22
24
  import ActionButton from './ActionButton'
23
25
  import { Avatar } from './Avatar'
24
26
  import { CloseButton } from './CloseButton'
27
+ import { CustomMessage } from './CustomMessage'
25
28
  import { CustomMessageInput } from './CustomMessageInput'
26
29
  import { CustomSystemMessage } from './CustomSystemMessage'
27
30
  import { ChannelEmptyState } from './MessagingShell/ChannelEmptyState'
@@ -487,31 +490,39 @@ const ChannelViewInner: React.FC<{
487
490
 
488
491
  return (
489
492
  <>
490
- <Window>
491
- {/* Custom Channel Header */}
492
- <div className="p-4">
493
- <CustomChannelHeader
494
- onBack={onBack}
495
- showBackButton={showBackButton}
496
- onShowInfo={handleShowInfo}
497
- canShowInfo={Boolean(participant)}
498
- />
499
- </div>
493
+ <WithComponents
494
+ overrides={{
495
+ Message: (props: MessageUIComponentProps) => (
496
+ <CustomMessage {...props} />
497
+ ),
498
+ }}
499
+ >
500
+ <Window>
501
+ {/* Custom Channel Header */}
502
+ <div className="p-4">
503
+ <CustomChannelHeader
504
+ onBack={onBack}
505
+ showBackButton={showBackButton}
506
+ onShowInfo={handleShowInfo}
507
+ canShowInfo={Boolean(participant)}
508
+ />
509
+ </div>
500
510
 
501
- {/* Message List */}
502
- <div className="flex-1 overflow-hidden relative">
503
- <MessageList
504
- hideDeletedMessages
505
- hideNewMessageSeparator={false}
506
- messageActions={[]}
507
- />
508
- </div>
511
+ {/* Message List */}
512
+ <div className="flex-1 overflow-hidden relative">
513
+ <MessageList
514
+ hideDeletedMessages
515
+ hideNewMessageSeparator={false}
516
+ messageActions={undefined}
517
+ />
518
+ </div>
509
519
 
510
- {/* Message Input */}
511
- <CustomMessageInput
512
- renderActions={() => renderMessageInputActions?.(channel)}
513
- />
514
- </Window>
520
+ {/* Message Input */}
521
+ <CustomMessageInput
522
+ renderActions={() => renderMessageInputActions?.(channel)}
523
+ />
524
+ </Window>
525
+ </WithComponents>
515
526
 
516
527
  {/* Channel Info Dialog */}
517
528
  <ChannelInfoDialog
@@ -0,0 +1,9 @@
1
+ import { MessageSimple, type MessageUIComponentProps } from 'stream-chat-react'
2
+
3
+ export const CustomMessage = (props: MessageUIComponentProps) => {
4
+ return (
5
+ <div className="custom-message">
6
+ <MessageSimple {...props} />
7
+ </div>
8
+ )
9
+ }