Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"emoji-mart": "^5.4.0",
"react": "^19.0.0 || ^18.0.0 || ^17.0.0",
"react-dom": "^19.0.0 || ^18.0.0 || ^17.0.0",
"stream-chat": "^9.35.0"
"stream-chat": "^9.37.0"
},
"peerDependenciesMeta": {
"@breezystack/lamejs": {
Expand Down Expand Up @@ -212,7 +212,7 @@
"react-dom": "^19.0.0",
"sass": "^1.97.2",
"semantic-release": "^25.0.2",
"stream-chat": "^9.35.0",
"stream-chat": "^9.37.0",
"ts-jest": "^29.2.5",
"typescript": "^5.4.5",
"typescript-eslint": "^8.17.0",
Expand Down
6 changes: 3 additions & 3 deletions src/components/MessageInput/MessageComposerActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useMessageInputContext,
} from '../../context';
import { AIStates, useAIState } from '../AIStateIndicator';
import { useMessageComposer, useMessageCompositionIsEmpty } from './hooks';
import { useMessageComposer, useMessageContentIsEmpty } from './hooks';
import { AudioRecordingButtonWithNotification } from '../MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification';
import { useIsCooldownActive } from './hooks/useIsCooldownActive';
import type { MessageComposerState, TextComposerState } from 'stream-chat';
Expand Down Expand Up @@ -44,7 +44,7 @@ export const MessageComposerActions = () => {
textComposerStateSelector,
);

const compositionIsEmpty = useMessageCompositionIsEmpty();
const contentIsEmpty = useMessageContentIsEmpty();
/**
* This bit here is needed to make sure that we can get rid of the default behaviour
* if need be. Essentially, this allows us to pass StopAIGenerationButton={null} and
Expand Down Expand Up @@ -81,7 +81,7 @@ export const MessageComposerActions = () => {

if (isCooldownActive) {
content = <CooldownTimer />;
} else if (compositionIsEmpty && !editedMessage && recordingEnabled) {
} else if (contentIsEmpty && !editedMessage && recordingEnabled) {
content = <AudioRecordingButtonWithNotification />;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/MessageInput/MessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const MessageInputProvider = (props: PropsWithChildren<MessageInputProps>) => {
if (
!threadId ||
!messageComposer.channel ||
!messageComposer.compositionIsEmpty ||
!messageComposer.contentIsEmpty ||
!messageComposer.config.drafts.enabled
)
return;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MessageInput/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export * from './useCooldownRemaining';
export * from './useMessageInputControls';
export * from './useMessageComposer';
export * from './useMessageComposerHasSendableData';
export * from './useMessageCompositionIsEmpty';
export * from './useMessageContentIsEmpty';
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useStateStore } from '../../../store';

const editingAuditStateStateSelector = (state: EditingAuditState) => state;

export const useMessageCompositionIsEmpty = () => {
export const useMessageContentIsEmpty = () => {
const messageComposer = useMessageComposer();
useStateStore(messageComposer.editingAuditState, editingAuditStateStateSelector);
return messageComposer.compositionIsEmpty;
return messageComposer.contentIsEmpty;
};
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11919,10 +11919,10 @@ stdin-discarder@^0.2.2:
resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be"
integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==

stream-chat@^9.35.0:
version "9.35.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.35.0.tgz#667a046b16dc60675eca102e2c7a4f2a0ca23351"
integrity sha512-WQU3IbVmqUUjwNPgMCiPSKSOUXwfYDbTrQF/ijrSrT0XAFGyi7uZff8vdiTnz9jPE+ZZcuHojN9c9DAw4m1FFQ==
stream-chat@^9.37.0:
version "9.37.0"
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.37.0.tgz#6a791197114fc4d30379740659a9f6efcc8f1794"
integrity sha512-AeFgc5jp2DvZtLwv+VIZ7qbPGaZL79eS15Vd5RJPDhLNov93NmXu+Nvdl6lE2qYdRw1Fur/2dB+WA015hj/l6A==
dependencies:
"@types/jsonwebtoken" "^9.0.8"
"@types/ws" "^8.5.14"
Expand Down
Loading