-
Notifications
You must be signed in to change notification settings - Fork 11k
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/roomMembers-actions
- Loading branch information
Showing
30 changed files
with
581 additions
and
171 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 | ||
--- | ||
|
||
Removes a validation that allowed only the room creator to propagate E2EE room keys. This was causing issues when the rooms were created via apps or some other integration, as the creator may not be online or able to create E2EE keys |
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 condition causing Omnichannel queue to start more than once. |
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 `im.counters` endpoint returning `null` on `unread` messages property for users that have never opened the queried DM |
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 a behavior of the mentions parser that identified mentions inside markdown links text. Now, these components will be removed from the text before trying to parse mentions. |
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
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
48 changes: 0 additions & 48 deletions
48
apps/meteor/app/message-mark-as-unread/client/actionButton.ts
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
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
20 changes: 20 additions & 0 deletions
20
apps/meteor/client/components/message/hooks/useMarkAsUnreadMutation.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,20 @@ | ||
import type { IMessage, ISubscription } from '@rocket.chat/core-typings'; | ||
import { useToastMessageDispatch } from '@rocket.chat/ui-contexts'; | ||
import { useMutation } from '@tanstack/react-query'; | ||
|
||
import { LegacyRoomManager } from '../../../../app/ui-utils/client'; | ||
import { sdk } from '../../../../app/utils/client/lib/SDKClient'; | ||
|
||
export const useMarkAsUnreadMutation = () => { | ||
const dispatchToastMessage = useToastMessageDispatch(); | ||
|
||
return useMutation({ | ||
mutationFn: async ({ message, subscription }: { message: IMessage; subscription: ISubscription }) => { | ||
await LegacyRoomManager.close(subscription.t + subscription.name); | ||
await sdk.call('unreadMessages', message); | ||
}, | ||
onError: (error) => { | ||
dispatchToastMessage({ type: 'error', message: error }); | ||
}, | ||
}); | ||
}; |
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
47 changes: 47 additions & 0 deletions
47
apps/meteor/client/components/message/toolbar/useMarkAsUnreadMessageAction.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,47 @@ | ||
import { isOmnichannelRoom } from '@rocket.chat/core-typings'; | ||
import type { ISubscription, IMessage, IRoom, IUser } from '@rocket.chat/core-typings'; | ||
import { useRouter } from '@rocket.chat/ui-contexts'; | ||
import { useEffect } from 'react'; | ||
|
||
import { MessageAction } from '../../../../app/ui-utils/client'; | ||
import { useMarkAsUnreadMutation } from '../hooks/useMarkAsUnreadMutation'; | ||
|
||
export const useMarkAsUnreadMessageAction = ( | ||
message: IMessage, | ||
{ user, room, subscription }: { user: IUser | undefined; room: IRoom; subscription: ISubscription | undefined }, | ||
) => { | ||
const { mutateAsync: markAsUnread } = useMarkAsUnreadMutation(); | ||
|
||
const router = useRouter(); | ||
|
||
useEffect(() => { | ||
if (isOmnichannelRoom(room) || !user) { | ||
return; | ||
} | ||
|
||
if (!subscription) { | ||
return; | ||
} | ||
|
||
if (message.u._id === user._id) { | ||
return; | ||
} | ||
|
||
MessageAction.addButton({ | ||
id: 'mark-message-as-unread', | ||
icon: 'flag', | ||
label: 'Mark_unread', | ||
context: ['message', 'message-mobile', 'threads'], | ||
type: 'interaction', | ||
async action() { | ||
router.navigate('/home'); | ||
await markAsUnread({ message, subscription }); | ||
}, | ||
order: 4, | ||
group: 'menu', | ||
}); | ||
return () => { | ||
MessageAction.removeButton('mark-message-as-unread'); | ||
}; | ||
}, [markAsUnread, message, room, router, subscription, user]); | ||
}; |
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
Oops, something went wrong.