-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: remove matrix bridged collections #37035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7049bbe
f09fb3c
4277862
87560de
46ede22
aad89f2
6198f22
5f9d126
2085488
ceb09f6
2c4432e
3b60f94
ce2a254
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -41,14 +41,14 @@ interface EventLikeCallbackSignatures { | |||||||||
| 'afterCreateChannel': (owner: IUser, room: IRoom) => void; | ||||||||||
| 'afterCreatePrivateGroup': (owner: IUser, room: IRoom) => void; | ||||||||||
| 'afterDeactivateUser': (user: IUser) => void; | ||||||||||
| 'afterDeleteMessage': (message: IMessage, room: IRoom) => void; | ||||||||||
| 'afterDeleteMessage': (message: IMessage, params: { room: IRoom; user: IUser }) => void; | ||||||||||
| 'workspaceLicenseChanged': (license: string) => void; | ||||||||||
| 'workspaceLicenseRemoved': () => void; | ||||||||||
| 'afterReadMessages': (rid: IRoom['_id'], params: { uid: IUser['_id']; lastSeen?: Date; tmid?: IMessage['_id'] }) => void; | ||||||||||
| 'beforeReadMessages': (rid: IRoom['_id'], uid: IUser['_id']) => void; | ||||||||||
| 'afterDeleteUser': (user: IUser) => void; | ||||||||||
| 'afterFileUpload': (params: { user: IUser; room: IRoom; message: IMessage }) => void; | ||||||||||
| 'afterRoomNameChange': (params: { room: IRoom; name: string; oldName: string; userId: IUser['_id'] }) => void; | ||||||||||
| 'afterRoomNameChange': (params: { room: IRoom; name: string; oldName: string; user: IUser }) => void; | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid breaking existing listeners: keep userId as a backward‑compat payload field. Many callbacks likely read params.userId. Add an optional userId while introducing user to avoid ecosystem breakage. Apply this diff: - 'afterRoomNameChange': (params: { room: IRoom; name: string; oldName: string; user: IUser }) => void;
+ 'afterRoomNameChange': (params: { room: IRoom; name: string; oldName: string; user: IUser; userId?: IUser['_id'] }) => void;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| 'afterSaveMessage': (message: IMessage, params: { room: IRoom; user: IUser; roomUpdater?: Updater<IRoom> }) => void; | ||||||||||
| 'afterOmnichannelSaveMessage': (message: IMessage, constant: { room: IOmnichannelRoom; roomUpdater: Updater<IOmnichannelRoom> }) => void; | ||||||||||
| 'livechat.removeAgentDepartment': (params: { departmentId: ILivechatDepartmentRecord['_id']; agentsId: ILivechatAgent['_id'][] }) => void; | ||||||||||
|
|
@@ -64,7 +64,7 @@ interface EventLikeCallbackSignatures { | |||||||||
| user: AtLeast<IUser, '_id' | 'federated' | 'roles'>; | ||||||||||
| inviter: AtLeast<IUser, '_id' | 'username'>; | ||||||||||
| }) => void; | ||||||||||
| 'afterCreateDirectRoom': (params: IRoom, second: { members: IUser[]; creatorId: IUser['_id'] }) => void; | ||||||||||
| 'afterCreateDirectRoom': (params: IRoom, second: { members: IUser[]; creatorId: IUser['_id']; mrid?: string }) => void; | ||||||||||
| 'beforeDeleteRoom': (params: IRoom) => void; | ||||||||||
| 'beforeJoinDefaultChannels': (user: IUser) => void; | ||||||||||
| 'beforeCreateChannel': (owner: IUser, room: IRoom) => void; | ||||||||||
|
|
@@ -205,7 +205,7 @@ type ChainedCallbackSignatures = { | |||||||||
| 'roomAvatarChanged': (room: IRoom) => void; | ||||||||||
| 'beforeGetMentions': (mentionIds: string[], teamMentions: MessageMention[]) => Promise<string[]>; | ||||||||||
| 'livechat.manageDepartmentUnit': (params: { userId: string; departmentId: string; unitId?: string }) => void; | ||||||||||
| 'afterRoomTopicChange': (params: undefined, { room, topic, userId }: { room: IRoom; topic: string; userId: IUser['_id'] }) => void; | ||||||||||
| 'afterRoomTopicChange': (params: undefined, { room, topic, user }: { room: IRoom; topic: string; user: IUser }) => void; | ||||||||||
| }; | ||||||||||
|
Comment on lines
+208
to
209
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Match topic-change callback payload with name-change: add optional userId. Keeps parity and eases migration for handlers still expecting userId. Apply this diff: - 'afterRoomTopicChange': (params: undefined, { room, topic, user }: { room: IRoom; topic: string; user: IUser }) => void;
+ 'afterRoomTopicChange': (params: undefined, { room, topic, user, userId }: { room: IRoom; topic: string; user: IUser; userId?: IUser['_id'] }) => void;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| export type Hook = | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass userId for compatibility with existing handlers.
Current payload changed to user. Provide userId too to minimize breakage and align with callbacks type update.
Apply this diff:
Additionally, consider typing the parameter as AtLeast<IUser, '_id' | 'username'> or loading the full IUser before invoking callbacks.
📝 Committable suggestion
🤖 Prompt for AI Agents