-
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 bio-empty
- Loading branch information
Showing
468 changed files
with
11,622 additions
and
3,334 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 | ||
--- | ||
|
||
Fixes issue that could cause multiple discussions to be created when creating it from a message action |
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 | ||
--- | ||
|
||
Improves thread metrics featuring user avatars, better titles and repositioned elements. |
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/rest-typings': minor | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
Adds cursor pagination on chat.syncMessages endpoint |
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 sidepanel not replicating sidebar sort preference |
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": minor | ||
--- | ||
|
||
Adds a new route to allow fetching avatars by the user's id `/avatar/uid/<UserID>` |
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,17 @@ | ||
--- | ||
'@rocket.chat/model-typings': minor | ||
'@rocket.chat/core-typings': minor | ||
'@rocket.chat/rest-typings': minor | ||
'@rocket.chat/apps-engine': minor | ||
'@rocket.chat/i18n': minor | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
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 |
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/i18n": patch | ||
--- | ||
|
||
Adds "Master volume" and "Call ringer volume" to the user preferences sound section. |
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,8 @@ | ||
--- | ||
'@rocket.chat/apps-engine': minor | ||
'@rocket.chat/livechat': minor | ||
'@rocket.chat/i18n': minor | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions |
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,4 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
Adds login and permission validation for resetIrcConnection method |
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 | ||
--- | ||
|
||
Disables the possiblity to upload exempted apps |
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 an issue where resizable handler renders over the expanded thread view while using contextualbarResizable feature preview |
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,62 @@ | ||
diff --git a/package.json b/package.json | ||
index 9f37b1dd9e3ea128aafb0ceef83641e864474308..795e15b1b008596f0a278ff43cb1103794c10d9d 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -24,6 +24,7 @@ | ||
"default": "./swiper-bundle.mjs" | ||
}, | ||
"./css": "./swiper.css", | ||
+ "./swiper.css": "./swiper.css", | ||
"./css/bundle": "./swiper-bundle.css", | ||
"./swiper-bundle.css": "./swiper-bundle.css", | ||
"./css/a11y": "./modules/a11y.css", | ||
@@ -49,6 +50,7 @@ | ||
"./css/thumbs": "./modules/thumbs.css", | ||
"./css/virtual": "./modules/virtual.css", | ||
"./css/zoom": "./modules/zoom.css", | ||
+ "./modules/zoom.css": "./modules/zoom.css", | ||
"./less": "./swiper.less", | ||
"./less/a11y": "./modules/a11y.less", | ||
"./less/autoplay": "./modules/autoplay.less", | ||
@@ -136,6 +138,10 @@ | ||
"types": "./swiper-react.d.ts", | ||
"default": "./swiper-react.mjs" | ||
}, | ||
+ "./swiper-react.mjs": { | ||
+ "types": "./swiper-react.d.ts", | ||
+ "default": "./swiper-react.mjs" | ||
+ }, | ||
"./vue": { | ||
"types": "./swiper-vue.d.ts", | ||
"default": "./swiper-vue.mjs" | ||
@@ -144,6 +150,10 @@ | ||
"types": "./types/modules/index.d.ts", | ||
"default": "./modules/index.mjs" | ||
}, | ||
+ "./modules/index.mjs": { | ||
+ "types": "./types/modules/index.d.ts", | ||
+ "default": "./modules/index.mjs" | ||
+ }, | ||
"./types": "./types/index.d.ts", | ||
"./package.json": "./package.json" | ||
}, | ||
@@ -152,6 +162,9 @@ | ||
"modules": [ | ||
"./types/modules/index.d.ts" | ||
], | ||
+ "modules/index.mjs": [ | ||
+ "./types/modules/index.d.ts" | ||
+ ], | ||
"element": [ | ||
"./swiper-element.d.ts" | ||
], | ||
@@ -161,6 +174,9 @@ | ||
"react": [ | ||
"./swiper-react.d.ts" | ||
], | ||
+ "swiper-react.mjs": [ | ||
+ "./swiper-react.d.ts" | ||
+ ], | ||
"vue": [ | ||
"./swiper-vue.d.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
36 changes: 36 additions & 0 deletions
36
apps/meteor/app/api/server/lib/maybeMigrateLivechatRoom.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,36 @@ | ||
import { isOmnichannelRoom, type IRoom } from '@rocket.chat/core-typings'; | ||
import { Rooms } from '@rocket.chat/models'; | ||
import type { FindOptions } from 'mongodb'; | ||
|
||
import { projectionAllowsAttribute } from './projectionAllowsAttribute'; | ||
import { migrateVisitorIfMissingContact } from '../../../livechat/server/lib/contacts/migrateVisitorIfMissingContact'; | ||
|
||
/** | ||
* If the room is a livechat room and it doesn't yet have a contact, trigger the migration for its visitor and source | ||
* The migration will create/use a contact and assign it to every room that matches this visitorId and source. | ||
**/ | ||
export async function maybeMigrateLivechatRoom(room: IRoom | null, options: FindOptions<IRoom> = {}): Promise<IRoom | null> { | ||
if (!room || !isOmnichannelRoom(room)) { | ||
return room; | ||
} | ||
|
||
// Already migrated | ||
if (room.contactId) { | ||
return room; | ||
} | ||
|
||
// If the query options specify that contactId is not needed, then do not trigger the migration | ||
if (!projectionAllowsAttribute('contactId', options)) { | ||
return room; | ||
} | ||
|
||
const contactId = await migrateVisitorIfMissingContact(room.v._id, room.source); | ||
|
||
// Did not migrate | ||
if (!contactId) { | ||
return room; | ||
} | ||
|
||
// Load the room again with the same options so it can be reloaded with the contactId in place | ||
return Rooms.findOneById(room._id, options); | ||
} |
29 changes: 29 additions & 0 deletions
29
apps/meteor/app/api/server/lib/projectionAllowsAttribute.spec.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,29 @@ | ||
import { expect } from 'chai'; | ||
|
||
import { projectionAllowsAttribute } from './projectionAllowsAttribute'; | ||
|
||
describe('projectionAllowsAttribute', () => { | ||
it('should return true if there are no options', () => { | ||
expect(projectionAllowsAttribute('attributeName')).to.be.equal(true); | ||
}); | ||
|
||
it('should return true if there is no projection', () => { | ||
expect(projectionAllowsAttribute('attributeName', {})).to.be.equal(true); | ||
}); | ||
|
||
it('should return true if the field is projected', () => { | ||
expect(projectionAllowsAttribute('attributeName', { projection: { attributeName: 1 } })).to.be.equal(true); | ||
}); | ||
|
||
it('should return false if the field is disallowed by projection', () => { | ||
expect(projectionAllowsAttribute('attributeName', { projection: { attributeName: 0 } })).to.be.equal(false); | ||
}); | ||
|
||
it('should return false if the field is not projected and others are', () => { | ||
expect(projectionAllowsAttribute('attributeName', { projection: { anotherAttribute: 1 } })).to.be.equal(false); | ||
}); | ||
|
||
it('should return true if the field is not projected and others are disallowed', () => { | ||
expect(projectionAllowsAttribute('attributeName', { projection: { anotherAttribute: 0 } })).to.be.equal(true); | ||
}); | ||
}); |
19 changes: 19 additions & 0 deletions
19
apps/meteor/app/api/server/lib/projectionAllowsAttribute.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,19 @@ | ||
import type { IRocketChatRecord } from '@rocket.chat/core-typings'; | ||
import type { FindOptions } from 'mongodb'; | ||
|
||
export function projectionAllowsAttribute(attributeName: string, options?: FindOptions<IRocketChatRecord>): boolean { | ||
if (!options?.projection) { | ||
return true; | ||
} | ||
|
||
if (attributeName in options.projection) { | ||
return Boolean(options.projection[attributeName]); | ||
} | ||
|
||
const projectingAllowedFields = Object.values(options.projection).some((value) => Boolean(value)); | ||
|
||
// If the attribute is not on the projection list, return the opposite of the values in the projection. aka: | ||
// if the projection is specifying blocked fields, then this field is allowed; | ||
// if the projection is specifying allowed fields, then this field is blocked; | ||
return !projectingAllowedFields; | ||
} |
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
Oops, something went wrong.