-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/action-menu-overflow-in-moderation-page
- Loading branch information
Showing
19 changed files
with
130 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fixed an issue that caused clients to not properly receive certain server notifications right after login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
fixes mail export form "To additional emails" field validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
apps/meteor/client/components/message/hooks/usePinMessageMutation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
apps/meteor/client/components/message/toolbar/useJumpToMessageContextAction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
import { useEffect } from 'react'; | ||
|
||
import type { MessageActionContext } from '../../../../app/ui-utils/client/lib/MessageAction'; | ||
import { MessageAction } from '../../../../app/ui-utils/client/lib/MessageAction'; | ||
import { setMessageJumpQueryStringParameter } from '../../../lib/utils/setMessageJumpQueryStringParameter'; | ||
|
||
export const useJumpToMessageContextAction = ( | ||
message: IMessage, | ||
{ id, order, hidden, context }: { id: string; order: number; hidden?: boolean; context: MessageActionContext[] }, | ||
) => { | ||
useEffect(() => { | ||
if (hidden) { | ||
return; | ||
} | ||
|
||
MessageAction.addButton({ | ||
id, | ||
icon: 'jump', | ||
label: 'Jump_to_message', | ||
context, | ||
async action() { | ||
setMessageJumpQueryStringParameter(message._id); | ||
}, | ||
order, | ||
group: 'message', | ||
}); | ||
|
||
return () => { | ||
MessageAction.removeButton(id); | ||
}; | ||
}, [hidden, context, id, message._id, order]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { RocketChatError } from './RocketChatError'; | ||
|
||
export class NotAuthorizedError extends RocketChatError<'not-authorized'> { | ||
constructor(message = 'Not authorized', details?: string) { | ||
constructor(message = 'Not authorized', details?: unknown) { | ||
super('not-authorized', message, details); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { RocketChatError } from './RocketChatError'; | ||
|
||
export class PinMessagesNotAllowed extends RocketChatError<'error-pinning-message'> { | ||
constructor(message = 'Pinning messages is not allowed', details?: unknown) { | ||
super('error-pinning-message', message, details); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
apps/meteor/client/lib/mutationEffects/updatePinMessage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { IMessage } from '@rocket.chat/core-typings'; | ||
|
||
import { Messages } from '../../../app/models/client'; | ||
import { PinMessagesNotAllowed } from '../errors/PinMessagesNotAllowed'; | ||
|
||
export const updatePinMessage = (message: IMessage, data: Partial<IMessage>) => { | ||
const msg = Messages.findOne({ _id: message._id }); | ||
|
||
if (!msg) { | ||
throw new PinMessagesNotAllowed('Error pinning message', { | ||
method: 'pinMessage', | ||
}); | ||
} | ||
|
||
Messages.update( | ||
{ | ||
_id: message._id, | ||
rid: message.rid, | ||
}, | ||
{ $set: data }, | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
import './openRoom'; | ||
import './pinMessage'; | ||
import './unpinMessage'; | ||
import './updateMessage'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
import './jumpToMessage'; | ||
import './jumpToPinMessage'; | ||
import './jumpToSearchMessage'; | ||
import './jumpToStarMessage'; | ||
import './permalinkPinned'; | ||
import './unpinMessage'; |
Oops, something went wrong.