-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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 feat/add-endpoints-groups.membersOrderedB…
…yRole-channels.membersOrderedByRole
- Loading branch information
Showing
66 changed files
with
2,047 additions
and
1,290 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,7 @@ | ||
--- | ||
"@rocket.chat/meteor": minor | ||
"@rocket.chat/i18n": minor | ||
"@rocket.chat/rest-typings": minor | ||
--- | ||
|
||
Allows agents and managers to close Omnichannel rooms that for some reason ended up in a bad state. This "bad state" could be a room that appears open but it's closed. Now, the endpoint `livechat/room.closeByUser` will accept an optional `forceClose` parameter that will allow users to bypass most state checks we do on rooms and perform the room closing again so its state can be recovered. |
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 SAML login redirecting to wrong room when using an invite link. |
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,6 @@ | ||
--- | ||
"@rocket.chat/meteor": minor | ||
"@rocket.chat/i18n": minor | ||
--- | ||
|
||
Fixes an issue where users without the "Preview public channel" permission would receive new messages sent to the channel |
574 changes: 287 additions & 287 deletions
574
.yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.6.0.cjs
Large diffs are not rendered by default.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import type { RoomType } from '@rocket.chat/core-typings'; | ||
import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; | ||
import type { TranslationKey } from '@rocket.chat/ui-contexts'; | ||
import { useEndpoint, useRouter, useSetModal, useToastMessageDispatch } from '@rocket.chat/ui-contexts'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
import { LegacyRoomManager } from '../../../app/ui-utils/client'; | ||
import { UiTextContext } from '../../../definition/IRoomTypeConfig'; | ||
import WarningModal from '../../components/WarningModal'; | ||
import { roomCoordinator } from '../../lib/rooms/roomCoordinator'; | ||
|
||
const leaveEndpoints = { | ||
p: '/v1/groups.leave', | ||
c: '/v1/channels.leave', | ||
d: '/v1/im.leave', | ||
v: '/v1/channels.leave', | ||
l: '/v1/groups.leave', | ||
} as const; | ||
|
||
type LeaveRoomProps = { | ||
rid: string; | ||
type: RoomType; | ||
name: string; | ||
roomOpen?: boolean; | ||
}; | ||
|
||
// TODO: this menu action should consider team leaving | ||
export const useLeaveRoomAction = ({ rid, type, name, roomOpen }: LeaveRoomProps) => { | ||
const { t } = useTranslation(); | ||
const setModal = useSetModal(); | ||
const dispatchToastMessage = useToastMessageDispatch(); | ||
const router = useRouter(); | ||
|
||
const leaveRoom = useEndpoint('POST', leaveEndpoints[type]); | ||
|
||
const handleLeave = useEffectEvent(() => { | ||
const leave = async (): Promise<void> => { | ||
try { | ||
await leaveRoom({ roomId: rid }); | ||
if (roomOpen) { | ||
router.navigate('/home'); | ||
} | ||
LegacyRoomManager.close(rid); | ||
} catch (error) { | ||
dispatchToastMessage({ type: 'error', message: error }); | ||
} finally { | ||
setModal(null); | ||
} | ||
}; | ||
|
||
const warnText = roomCoordinator.getRoomDirectives(type).getUiText(UiTextContext.LEAVE_WARNING); | ||
|
||
setModal( | ||
<WarningModal | ||
text={t(warnText as TranslationKey, name)} | ||
confirmText={t('Leave_room')} | ||
close={() => setModal(null)} | ||
cancelText={t('Cancel')} | ||
confirm={leave} | ||
/>, | ||
); | ||
}); | ||
|
||
return handleLeave; | ||
}; |
18 changes: 18 additions & 0 deletions
18
apps/meteor/client/hooks/menuActions/useToggleFavoriteAction.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,18 @@ | ||
import type { IRoom } from '@rocket.chat/core-typings'; | ||
import { useEffectEvent } from '@rocket.chat/fuselage-hooks'; | ||
import { useEndpoint, useToastMessageDispatch } from '@rocket.chat/ui-contexts'; | ||
|
||
export const useToggleFavoriteAction = ({ rid, isFavorite }: { rid: IRoom['_id']; isFavorite: boolean }) => { | ||
const toggleFavorite = useEndpoint('POST', '/v1/rooms.favorite'); | ||
const dispatchToastMessage = useToastMessageDispatch(); | ||
|
||
const handleToggleFavorite = useEffectEvent(async () => { | ||
try { | ||
await toggleFavorite({ roomId: rid, favorite: !isFavorite }); | ||
} catch (error) { | ||
dispatchToastMessage({ type: 'error', message: error }); | ||
} | ||
}); | ||
|
||
return handleToggleFavorite; | ||
}; |
Oops, something went wrong.