Skip to content

Commit 5052820

Browse files
committed
chore: update typings to match EventEmitter property pruning
1 parent 4077b6b commit 5052820

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ee/packages/federation-matrix/src/events/room.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ import { Rooms, Users } from '@rocket.chat/models';
66
import { getUsernameServername } from '../FederationMatrix';
77

88
export function room(emitter: Emitter<HomeserverEventSignatures>) {
9-
emitter.on('homeserver.matrix.room.name', async (data) => {
10-
const { room_id: roomId, name, user_id: userId } = data;
9+
emitter.on('homeserver.matrix.room.name', async ({ event }) => {
10+
const {
11+
room_id: roomId,
12+
content: { name },
13+
sender: userId,
14+
} = event;
1115

1216
const localRoomId = await Rooms.findOne({ 'federation.mrid': roomId }, { projection: { _id: 1 } });
1317
if (!localRoomId) {

ee/packages/federation-matrix/src/helpers/message.parsers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { EventID, HomeserverEventSignatures } from '@rocket.chat/federation
22
import { marked } from 'marked';
33
import sanitizeHtml from 'sanitize-html';
44

5-
type MatrixMessageContent = HomeserverEventSignatures['homeserver.matrix.message']['content'] & { format?: string };
5+
type MatrixMessageContent = HomeserverEventSignatures['homeserver.matrix.message']['event']['content'] & { format?: string };
66

77
type MatrixEvent = {
88
content?: { body?: string; formatted_body?: string };

0 commit comments

Comments
 (0)