Skip to content

Commit c70e3e9

Browse files
authored
Merge branch 'develop' into feat/no-wait-oembed
2 parents a682a1d + 1c7066f commit c70e3e9

File tree

56 files changed

+1201
-547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1201
-547
lines changed

.changeset/selfish-jeans-rest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Prevents custom status being saved in local storage as `undefined` and breaking the UI when accessing it

.changeset/spotty-steaks-notice.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@rocket.chat/apps-engine': patch
3+
'@rocket.chat/meteor': patch
4+
---
5+
6+
Fixes an issue that caused a spike in memory usage when apps handled the IPreFileUpload event

.changeset/tall-timers-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Fixes workspace statistics deployment data not updating on server version changes.

apps/meteor/app/api/server/lib/eraseTeam.spec.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ describe('eraseTeam (TypeScript) module', () => {
4040
IPostRoomDeleted: 'IPostRoomDeleted',
4141
},
4242
Apps: {
43-
self: { isLoaded: () => false },
44-
getBridges: () => ({
45-
getListenerBridge: () => ({
46-
roomEvent: sandbox.stub().resolves(false),
47-
}),
48-
}),
43+
self: {
44+
isLoaded: () => false,
45+
triggerEvent: sandbox.stub().resolves(false),
46+
},
4947
},
5048
},
5149
'@rocket.chat/models': {
@@ -194,8 +192,10 @@ describe('eraseTeam (TypeScript) module', () => {
194192
const AppsStub = {
195193
AppEvents: stubs['@rocket.chat/apps'].AppEvents,
196194
Apps: {
197-
self: { isLoaded: () => true },
198-
getBridges: () => ({ getListenerBridge: () => ({ roomEvent: listenerStub }) }),
195+
self: {
196+
isLoaded: () => true,
197+
triggerEvent: listenerStub,
198+
},
199199
},
200200
};
201201

@@ -244,8 +244,10 @@ describe('eraseTeam (TypeScript) module', () => {
244244
const AppsStub = {
245245
AppEvents: stubs['@rocket.chat/apps'].AppEvents,
246246
Apps: {
247-
self: { isLoaded: () => true },
248-
getBridges: () => ({ getListenerBridge: () => ({ roomEvent: roomEventStub }) }),
247+
self: {
248+
isLoaded: () => true,
249+
triggerEvent: roomEventStub,
250+
},
249251
},
250252
};
251253

apps/meteor/app/api/server/lib/eraseTeam.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export async function eraseRoomLooseValidation(rid: string): Promise<boolean> {
7575
}
7676

7777
if (Apps.self?.isLoaded()) {
78-
const prevent = await Apps.getBridges()?.getListenerBridge().roomEvent(AppEvents.IPreRoomDeletePrevent, room);
78+
const prevent = await Apps.self?.triggerEvent(AppEvents.IPreRoomDeletePrevent, room);
7979
if (prevent) {
8080
return false;
8181
}
@@ -89,7 +89,7 @@ export async function eraseRoomLooseValidation(rid: string): Promise<boolean> {
8989
}
9090

9191
if (Apps.self?.isLoaded()) {
92-
void Apps.getBridges()?.getListenerBridge().roomEvent(AppEvents.IPostRoomDeleted, room);
92+
void Apps.self?.triggerEvent(AppEvents.IPostRoomDeleted, room);
9393
}
9494

9595
return true;

apps/meteor/app/apps/server/bridges/listeners.js

Lines changed: 0 additions & 248 deletions
This file was deleted.

0 commit comments

Comments
 (0)