Skip to content

Commit

Permalink
Merge branch 'develop' into SB-691
Browse files Browse the repository at this point in the history
  • Loading branch information
hiagohubert authored Dec 2, 2024
2 parents 2ba73a0 + a11f41e commit 2b2c7c4
Show file tree
Hide file tree
Showing 122 changed files with 1,778 additions and 316 deletions.
5 changes: 5 additions & 0 deletions .changeset/bump-patch-1732728542480.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Bump @rocket.chat/meteor version.
111 changes: 111 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"mode": "pre",
"tag": "rc",
"initialVersions": {
"@rocket.chat/meteor": "7.1.0-develop",
"rocketchat-services": "2.0.0",
"@rocket.chat/uikit-playground": "0.6.0",
"@rocket.chat/account-service": "0.4.9",
"@rocket.chat/authorization-service": "0.4.9",
"@rocket.chat/ddp-streamer": "0.3.9",
"@rocket.chat/omnichannel-transcript": "0.4.9",
"@rocket.chat/presence-service": "0.4.9",
"@rocket.chat/queue-worker": "0.4.9",
"@rocket.chat/stream-hub-service": "0.4.9",
"@rocket.chat/license": "1.0.0",
"@rocket.chat/network-broker": "0.1.1",
"@rocket.chat/omnichannel-services": "0.3.6",
"@rocket.chat/pdf-worker": "0.2.6",
"@rocket.chat/presence": "0.2.9",
"@rocket.chat/ui-theming": "0.4.0",
"@rocket.chat/account-utils": "0.0.2",
"@rocket.chat/agenda": "0.1.0",
"@rocket.chat/api-client": "0.2.9",
"@rocket.chat/apps": "0.2.0",
"@rocket.chat/apps-engine": "1.47.0",
"@rocket.chat/base64": "1.0.13",
"@rocket.chat/cas-validate": "0.0.2",
"@rocket.chat/core-services": "0.7.1",
"@rocket.chat/core-typings": "7.1.0-develop",
"@rocket.chat/cron": "0.1.9",
"@rocket.chat/ddp-client": "0.3.9",
"@rocket.chat/eslint-config": "0.7.0",
"@rocket.chat/favicon": "0.0.2",
"@rocket.chat/freeswitch": "1.0.0",
"@rocket.chat/fuselage-ui-kit": "12.0.0",
"@rocket.chat/gazzodown": "12.0.0",
"@rocket.chat/i18n": "1.0.0",
"@rocket.chat/instance-status": "0.1.9",
"@rocket.chat/jest-presets": "0.0.1",
"@rocket.chat/jwt": "0.1.1",
"@rocket.chat/livechat": "1.20.1",
"@rocket.chat/log-format": "0.0.2",
"@rocket.chat/logger": "0.0.2",
"@rocket.chat/message-parser": "0.31.31",
"@rocket.chat/mock-providers": "0.1.4",
"@rocket.chat/model-typings": "1.0.0",
"@rocket.chat/models": "1.0.0",
"@rocket.chat/poplib": "0.0.2",
"@rocket.chat/password-policies": "0.0.2",
"@rocket.chat/patch-injection": "0.0.1",
"@rocket.chat/peggy-loader": "0.31.27",
"@rocket.chat/random": "1.2.2",
"@rocket.chat/release-action": "2.2.3",
"@rocket.chat/release-changelog": "0.1.0",
"@rocket.chat/rest-typings": "7.1.0-develop",
"@rocket.chat/server-cloud-communication": "0.0.2",
"@rocket.chat/server-fetch": "0.0.3",
"@rocket.chat/sha256": "1.0.10",
"@rocket.chat/tools": "0.2.2",
"@rocket.chat/tracing": "0.0.1",
"@rocket.chat/ui-avatar": "8.0.0",
"@rocket.chat/ui-client": "12.0.0",
"@rocket.chat/ui-composer": "0.4.0",
"@rocket.chat/ui-contexts": "12.0.0",
"@rocket.chat/ui-kit": "0.37.0",
"@rocket.chat/ui-video-conf": "12.0.0",
"@rocket.chat/ui-voip": "2.0.0",
"@rocket.chat/web-ui-registration": "12.0.0"
},
"changesets": [
"bump-patch-1732728542480",
"clean-flies-collect",
"curvy-flies-greet",
"fair-colts-remain",
"forty-gorillas-kneel",
"friendly-ravens-teach",
"green-papayas-thank",
"happy-stingrays-provide",
"honest-pumpkins-joke",
"lazy-avocados-whisper",
"lemon-foxes-carry",
"light-terms-ring",
"mean-cobras-sneeze",
"metal-avocados-serve",
"neat-flies-drive",
"nervous-rivers-fry",
"old-coins-bow",
"pink-dodos-greet",
"plenty-snakes-dream",
"popular-queens-brake",
"real-jeans-worry",
"serious-mice-film",
"seven-berries-check",
"seven-otters-fold",
"silent-steaks-happen",
"smart-radios-reflect",
"spicy-spiders-search",
"spotty-ads-knock",
"stale-actors-enjoy",
"sweet-needles-melt",
"swift-suns-perform",
"three-dragons-brush",
"tricky-trees-destroy",
"twelve-horses-suffer",
"twenty-news-own",
"two-guests-tan",
"unlucky-kangaroos-yawn",
"unlucky-wasps-check",
"weak-trees-exercise"
]
}
144 changes: 144 additions & 0 deletions apps/meteor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,149 @@
# @rocket.chat/meteor

## 7.1.0-rc.1

### Patch Changes

- Bump @rocket.chat/meteor version.

- <details><summary>Updated dependencies []:</summary>

- @rocket.chat/core-typings@7.1.0-rc.1
- @rocket.chat/rest-typings@7.1.0-rc.1
- @rocket.chat/license@1.0.1-rc.1
- @rocket.chat/omnichannel-services@0.3.7-rc.1
- @rocket.chat/pdf-worker@0.2.7-rc.1
- @rocket.chat/presence@0.2.10-rc.1
- @rocket.chat/api-client@0.2.10-rc.1
- @rocket.chat/apps@0.2.1-rc.1
- @rocket.chat/core-services@0.7.2-rc.1
- @rocket.chat/cron@0.1.10-rc.1
- @rocket.chat/freeswitch@1.0.1-rc.1
- @rocket.chat/fuselage-ui-kit@13.0.0-rc.1
- @rocket.chat/gazzodown@13.0.0-rc.1
- @rocket.chat/model-typings@1.1.0-rc.1
- @rocket.chat/ui-contexts@13.0.0-rc.1
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/network-broker@0.1.2-rc.1
- @rocket.chat/models@1.0.1-rc.1
- @rocket.chat/ui-theming@0.4.0
- @rocket.chat/ui-avatar@9.0.0-rc.1
- @rocket.chat/ui-client@13.0.0-rc.1
- @rocket.chat/ui-video-conf@13.0.0-rc.1
- @rocket.chat/ui-voip@3.0.0-rc.1
- @rocket.chat/web-ui-registration@13.0.0-rc.1
- @rocket.chat/instance-status@0.1.10-rc.1
</details>

## 7.1.0-rc.0

### Minor Changes

- ([#33897](https://github.com/RocketChat/Rocket.Chat/pull/33897)) adds unread badge to sidebar collapser

- ([#32906](https://github.com/RocketChat/Rocket.Chat/pull/32906)) Improves thread metrics featuring user avatars, better titles and repositioned elements.

- ([#33810](https://github.com/RocketChat/Rocket.Chat/pull/33810)) Adds cursor pagination on chat.syncMessages endpoint

- ([#33214](https://github.com/RocketChat/Rocket.Chat/pull/33214)) Adds a new route to allow fetching avatars by the user's id `/avatar/uid/<UserID>`

- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add:
- A brand-new omnichannel contact profile
- The ability to communicate with known contacts only
- Communicate with verified contacts only
- Merge verified contacts across different channels
- Block contact channels
- Resolve conflicting contact information when registered via different channels
- An advanced contact center filters
- ([#33920](https://github.com/RocketChat/Rocket.Chat/pull/33920)) Improves the customizability of the naming of automatic Persistent video calls discussions, allowing the date of the call to be in different parts of the name, using the `[date]` keyword.

- ([#33997](https://github.com/RocketChat/Rocket.Chat/pull/33997)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions

- ([#33814](https://github.com/RocketChat/Rocket.Chat/pull/33814)) Adds a confirmation modal to the cancel subscription action

- ([#33949](https://github.com/RocketChat/Rocket.Chat/pull/33949)) Disables the possiblity to upload exempted apps

### Patch Changes

- ([#33776](https://github.com/RocketChat/Rocket.Chat/pull/33776)) Fix user highlights not matching only whole words

- ([#33818](https://github.com/RocketChat/Rocket.Chat/pull/33818)) Remove unused client side `setUserActiveStatus` meteor method.

- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0

- ([#33713](https://github.com/RocketChat/Rocket.Chat/pull/33713)) Deprecated the `from` field in the apps email bridge and made it optional, using the server's settings when the field is omitted

- ([#32991](https://github.com/RocketChat/Rocket.Chat/pull/32991)) Fixes an issue where updating custom emojis didn’t work as expected, ensuring that uploaded emojis now update correctly and display without any caching problems.

- ([#33985](https://github.com/RocketChat/Rocket.Chat/pull/33985)) Fixes issue that could cause multiple discussions to be created when creating it from a message action

- ([#33904](https://github.com/RocketChat/Rocket.Chat/pull/33904)) adds missing html attributes in sidebar item templates

- ([#33218](https://github.com/RocketChat/Rocket.Chat/pull/33218)) Fixes message character limit not being applied to file upload descriptions

- ([#33908](https://github.com/RocketChat/Rocket.Chat/pull/33908)) Fixes the issue where newly created teams are incorrectly displayed as channels on the sidebar when the DISABLE_DB_WATCHERS environment variable is enabled

- ([#33953](https://github.com/RocketChat/Rocket.Chat/pull/33953)) Adds a divider on Create team modal - advanced settings

- ([#33786](https://github.com/RocketChat/Rocket.Chat/pull/33786)) Fixed an issue that would grant network permission to app's processes in wrong cases

- ([#33986](https://github.com/RocketChat/Rocket.Chat/pull/33986)) Fixes sidepanel not replicating sidebar sort preference

- ([#33689](https://github.com/RocketChat/Rocket.Chat/pull/33689)) Fixes banner breaking the UI with specific payloads

- ([#33808](https://github.com/RocketChat/Rocket.Chat/pull/33808)) Fixes client-side updates for recent emoji list when custom emojis are modified.

- ([#33902](https://github.com/RocketChat/Rocket.Chat/pull/33902)) Adds "Master volume" and "Call ringer volume" to the user preferences sound section.

- ([#33311](https://github.com/RocketChat/Rocket.Chat/pull/33311)) Sends server statistics only once a day despite multiple instance being started at different times.

- ([#33719](https://github.com/RocketChat/Rocket.Chat/pull/33719)) stops calling an object through proxy calling getQueueWorker

- ([#33785](https://github.com/RocketChat/Rocket.Chat/pull/33785)) Fixed an issue where the installed apps list would go stale without a refresh in some cases

- ([#33278](https://github.com/RocketChat/Rocket.Chat/pull/33278)) Fixes display of emoji aliases in custom emoji list by adding commas between aliases

- ([#33772](https://github.com/RocketChat/Rocket.Chat/pull/33772)) Fixes `waiting queue` feature. When `Livechat_waiting_queue` setting is enabled, incoming conversations should be sent to the queue instead of being assigned directly.

- ([#33963](https://github.com/RocketChat/Rocket.Chat/pull/33963)) Fixes edge case of thread unread not being added to unread group

- ([#33994](https://github.com/RocketChat/Rocket.Chat/pull/33994)) Adds login and permission validation for resetIrcConnection method

- ([#33880](https://github.com/RocketChat/Rocket.Chat/pull/33880)) Updates VoIP field labels from 'Free Extension Numbers' to 'Available Extensions' to better describe the field's purpose and improve clarity.

- ([#33958](https://github.com/RocketChat/Rocket.Chat/pull/33958)) Fixes an issue where resizable handler renders over the expanded thread view while using contextualbarResizable feature preview

- <details><summary>Updated dependencies [82767d8fd8a52ac348e8aded1d238e688d36129b, 80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 66ecc64fc1d4464ad2818ad04e23a09cdf221194, 6c83bf0657004ee9cf43d5c832f51826a6591165, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 3569b0a9c48f8b94ebaef2f8b607c52fdb8e570a, b4841cb7206d855d7a1bc7604683a5b4a48b7176, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, d1e6a73796269824fb1aa7afcc7b8aa242e34e90, 661cc01237629ce83699d6c25df25d12985e88bf, 63ccadc012499e004445ad6bc6cd2ff777aecbd1, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, 616655585cb1c5c60d7cee97e25b17af3dfda794, e5fe727f6a2f0e60cdf7ba225e1f6caa6db2045c, d398866dba725918017e3609807f9d0ab9b89b72, 322bafd4bd1fe91ed34610501b269e4d8951944c, d398866dba725918017e3609807f9d0ab9b89b72]:</summary>

- @rocket.chat/apps-engine@1.48.0-rc.0
- @rocket.chat/model-typings@1.1.0-rc.0
- @rocket.chat/core-typings@7.1.0-rc.0
- @rocket.chat/i18n@1.1.0-rc.0
- @rocket.chat/rest-typings@7.1.0-rc.0
- @rocket.chat/core-services@0.7.2-rc.0
- @rocket.chat/presence@0.2.10-rc.0
- @rocket.chat/apps@0.2.1-rc.0
- @rocket.chat/fuselage-ui-kit@13.0.0-rc.0
- @rocket.chat/omnichannel-services@0.3.7-rc.0
- @rocket.chat/models@1.0.1-rc.0
- @rocket.chat/license@1.0.1-rc.0
- @rocket.chat/pdf-worker@0.2.7-rc.0
- @rocket.chat/api-client@0.2.10-rc.0
- @rocket.chat/cron@0.1.10-rc.0
- @rocket.chat/freeswitch@1.0.1-rc.0
- @rocket.chat/gazzodown@13.0.0-rc.0
- @rocket.chat/ui-contexts@13.0.0-rc.0
- @rocket.chat/web-ui-registration@13.0.0-rc.0
- @rocket.chat/network-broker@0.1.2-rc.0
- @rocket.chat/instance-status@0.1.10-rc.0
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/ui-theming@0.4.0
- @rocket.chat/ui-avatar@9.0.0-rc.0
- @rocket.chat/ui-client@13.0.0-rc.0
- @rocket.chat/ui-video-conf@13.0.0-rc.0
- @rocket.chat/ui-voip@3.0.0-rc.0
</details>

## 7.0.0

### Major Changes
Expand Down
39 changes: 39 additions & 0 deletions apps/meteor/app/lib/server/lib/notifyListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ import type {
IMessage,
SettingValue,
MessageTypesValues,
ILivechatContact,
} from '@rocket.chat/core-typings';
import {
Rooms,
LivechatRooms,
Permissions,
Settings,
PbxEvents,
Expand Down Expand Up @@ -87,6 +89,16 @@ export const notifyOnRoomChangedByUsernamesOrUids = withDbWatcherCheck(
},
);

export const notifyOnRoomChangedByContactId = withDbWatcherCheck(
async <T extends ILivechatContact>(contactId: T['_id'], clientAction: ClientAction = 'updated'): Promise<void> => {
const cursor = LivechatRooms.findOpenByContactId(contactId);

void cursor.forEach((room) => {
void api.broadcast('watch.rooms', { clientAction, room });
});
},
);

export const notifyOnRoomChangedByUserDM = withDbWatcherCheck(
async <T extends IRoom>(userId: T['u']['_id'], clientAction: ClientAction = 'updated'): Promise<void> => {
const items = Rooms.findDMsByUids([userId]);
Expand Down Expand Up @@ -251,6 +263,20 @@ export const notifyOnLivechatInquiryChangedById = withDbWatcherCheck(
},
);

export const notifyOnLivechatInquiryChangedByVisitorIds = withDbWatcherCheck(
async (
visitorIds: ILivechatInquiryRecord['v']['_id'][],
clientAction: Exclude<ClientAction, 'removed'> = 'updated',
diff?: Partial<Record<keyof ILivechatInquiryRecord, unknown> & { queuedAt: Date; takenAt: Date }>,
): Promise<void> => {
const cursor = LivechatInquiry.findByVisitorIds(visitorIds);

void cursor.forEach((inquiry) => {
void api.broadcast('watch.inquiries', { clientAction, inquiry, diff });
});
},
);

export const notifyOnLivechatInquiryChangedByRoom = withDbWatcherCheck(
async (
rid: ILivechatInquiryRecord['rid'],
Expand Down Expand Up @@ -553,6 +579,19 @@ export const notifyOnSubscriptionChangedByUserIdAndRoomType = withDbWatcherCheck
},
);

export const notifyOnSubscriptionChangedByVisitorIds = withDbWatcherCheck(
async (
visitorIds: Exclude<ISubscription['v'], undefined>['_id'][],
clientAction: Exclude<ClientAction, 'removed'> = 'updated',
): Promise<void> => {
const cursor = Subscriptions.findOpenByVisitorIds(visitorIds, { projection: subscriptionFields });

void cursor.forEach((subscription) => {
void api.broadcast('watch.subscriptions', { clientAction, subscription });
});
},
);

export const notifyOnSubscriptionChangedByNameAndRoomType = withDbWatcherCheck(
async (filter: Partial<Pick<ISubscription, 'name' | 't'>>, clientAction: Exclude<ClientAction, 'removed'> = 'updated'): Promise<void> => {
const cursor = Subscriptions.findByNameAndRoomType(filter, { projection: subscriptionFields });
Expand Down
5 changes: 0 additions & 5 deletions apps/meteor/app/livechat/server/lib/contacts/ContactMerger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ export class ContactMerger {
customFieldsPerName.get(customField.type)?.push(customField);
}

const customFieldConflicts: CustomFieldAndValue[] = [];

for (const [key, customFields] of customFieldsPerName) {
const fieldName = key.replace('customFields.', '');

Expand All @@ -274,8 +272,6 @@ export class ContactMerger {
dataToSet[key] = first.value;
}
}

customFieldConflicts.push(...customFields);
}

const allConflicts: ILivechatContactConflictingField[] =
Expand All @@ -284,7 +280,6 @@ export class ContactMerger {
: [
...newNames.map((name): ILivechatContactConflictingField => ({ field: 'name', value: name })),
...newManagers.map((manager): ILivechatContactConflictingField => ({ field: 'manager', value: manager as string })),
...customFieldConflicts.map(({ type, value }): ILivechatContactConflictingField => ({ field: type, value })),
];

// Phones, Emails and Channels are simply added to the contact's existing list
Expand Down
Loading

0 comments on commit 2b2c7c4

Please sign in to comment.