forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'RocketChat:develop' into feature/add-download-button-to…
…-image-preview
- Loading branch information
Showing
116 changed files
with
3,013 additions
and
675 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": patch | ||
"@rocket.chat/core-typings": patch | ||
"@rocket.chat/livechat": patch | ||
--- | ||
|
||
Fixes issue causing the setDepartment Livechat API overriding some triggers conditions |
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 | ||
--- | ||
|
||
fix: Trigger `IPostLivechatRoomStarted` app event after inquiry is created. Previously, this event was fired after a room was created. This allowed to do some actions on rooms, but more elevated actions like transfering a room were not possible as at this point, an inquiry didn't exist. |
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,9 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
**Fixed enterprise settings value not being updated when license is removed or invalid** | ||
|
||
Added a license callbacks `onRemoveLicense` and `onInvalidateLicense` to update enterprise settings values when a license is removed/invalid. | ||
This solves a specific scenario where in case of a downgrade (license removal), `settings.get` would continue to return `value` for enterprise settings instead of `invalidValue` as it should. | ||
This would remain the case until the workspace was restarted. |
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 message composer command preview for text type |
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/ddp-client": patch | ||
--- | ||
|
||
fix: livechat sdk reconnect not resubscribing |
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/core-typings': minor | ||
'@rocket.chat/livechat': minor | ||
--- | ||
|
||
Added new Livechat trigger action "Send message (external service)" |
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": patch | ||
"@rocket.chat/core-services": patch | ||
--- | ||
|
||
`stopped` lifecycle method was unexpectedly synchronous when using microservices, causing our code to create race conditions. |
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 | ||
--- | ||
|
||
fix: CRM integration mismatch on callback type vs code validation. Previously, callback was attempting to register a `LivechatStarted` event, however, our internal code was expecting a `LivechatStart` event, causing the hook to receive incomplete 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
fix: Validate rooms are not taken before processing by queue. This will prevent an issue that caused a room, that's on an invalid state, to be re-processed by the queue worker, assigning it again to another user despite being already assigned to one. This happens when a room's inquiry gets to an state where it desyncs from the room object. Room is taken & served while inquiry is still queued. This fix will also reconciliate both when something like this happens: whenever the queue picks a chat that's already taken, it will update it's inquiry object to reflect that and avoid processing again. |
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,24 @@ | ||
--- | ||
"@rocket.chat/message-parser": patch | ||
--- | ||
|
||
feat(message-parser): add timestamps pattern | ||
|
||
### Usage | ||
|
||
Pattern: <t:{timestamp}:?{format}> | ||
|
||
- {timestamp} is a Unix timestamp | ||
- {format} is an optional parameter that can be used to customize the date and time format. | ||
|
||
#### Formats | ||
|
||
| Format | Description | Example | | ||
| ------ | ------------------------- | --------------------------------------- | | ||
| `t` | Short time | 12:00 AM | | ||
| `T` | Long time | 12:00:00 AM | | ||
| `d` | Short date | 12/31/2020 | | ||
| `D` | Long date | Thursday, December 31, 2020 | | ||
| `f` | Full date and time | Thursday, December 31, 2020 12:00 AM | | ||
| `F` | Full date and time (long) | Thursday, December 31, 2020 12:00:00 AM | | ||
| `R` | Relative time | 1 year ago | |
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/livechat": patch | ||
--- | ||
|
||
Fixes issue of the `setDepartment` Livechat API method not setting the store value properly (is was only setting on the guest object) |
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
74 changes: 74 additions & 0 deletions
74
apps/meteor/client/views/omnichannel/triggers/ConditionForm.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,74 @@ | ||
import type { SelectOption } from '@rocket.chat/fuselage'; | ||
import { Field, FieldGroup, FieldLabel, FieldRow, NumberInput, Select, TextInput } from '@rocket.chat/fuselage'; | ||
import { useUniqueId } from '@rocket.chat/fuselage-hooks'; | ||
import { useTranslation } from '@rocket.chat/ui-contexts'; | ||
import type { ComponentProps } from 'react'; | ||
import React, { useMemo } from 'react'; | ||
import type { Control } from 'react-hook-form'; | ||
import { Controller, useWatch } from 'react-hook-form'; | ||
|
||
import type { TriggersPayload } from './EditTrigger'; | ||
|
||
type ConditionFormType = ComponentProps<typeof Field> & { | ||
index: number; | ||
control: Control<TriggersPayload>; | ||
}; | ||
|
||
export const ConditionForm = ({ control, index, ...props }: ConditionFormType) => { | ||
const conditionFieldId = useUniqueId(); | ||
const t = useTranslation(); | ||
const conditionName = useWatch({ control, name: `conditions.${index}.name` }); | ||
|
||
const placeholders: { [conditionName: string]: string } = useMemo( | ||
() => ({ | ||
'page-url': t('Enter_a_regex'), | ||
'time-on-site': t('Time_in_seconds'), | ||
}), | ||
[t], | ||
); | ||
|
||
const conditionOptions: SelectOption[] = useMemo( | ||
() => [ | ||
['page-url', t('Visitor_page_URL')], | ||
['time-on-site', t('Visitor_time_on_site')], | ||
['chat-opened-by-visitor', t('Chat_opened_by_visitor')], | ||
['after-guest-registration', t('After_guest_registration')], | ||
], | ||
[t], | ||
); | ||
|
||
const conditionValuePlaceholder = placeholders[conditionName]; | ||
|
||
return ( | ||
<FieldGroup {...props}> | ||
<Field> | ||
<FieldLabel htmlFor={conditionFieldId}>{t('Condition')}</FieldLabel> | ||
<FieldRow> | ||
<Controller | ||
name={`conditions.${index}.name`} | ||
control={control} | ||
render={({ field }) => ( | ||
<Select {...field} id={conditionFieldId} options={conditionOptions} placeholder={t('Select_an_option')} /> | ||
)} | ||
/> | ||
</FieldRow> | ||
|
||
{conditionValuePlaceholder && ( | ||
<FieldRow> | ||
<Controller | ||
name={`conditions.${index}.value`} | ||
control={control} | ||
render={({ field }) => { | ||
if (conditionName === 'time-on-site') { | ||
return <NumberInput {...field} placeholder={conditionValuePlaceholder} />; | ||
} | ||
|
||
return <TextInput {...field} placeholder={conditionValuePlaceholder} />; | ||
}} | ||
/> | ||
</FieldRow> | ||
)} | ||
</Field> | ||
</FieldGroup> | ||
); | ||
}; |
Oops, something went wrong.