-
Notifications
You must be signed in to change notification settings - Fork 13k
regression(native-federation): fix typing loop between instances #37115
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
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 |
|---|---|---|
|
|
@@ -20,14 +20,8 @@ export const edus = async (emitter: Emitter<HomeserverEventSignatures>, eduProce | |
| return; | ||
| } | ||
|
|
||
| const matrixUser = await Users.findOne({ 'federation.mui': data.user_id }); | ||
| if (!matrixUser?.username) { | ||
| logger.debug(`No bridged user found for Matrix user_id: ${data.user_id}`); | ||
| return; | ||
| } | ||
|
|
||
| void api.broadcast('user.activity', { | ||
| user: matrixUser.username, | ||
| user: data.user_id, | ||
sampaiodiego marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| isTyping: data.typing, | ||
| roomId: matrixRoom._id, | ||
| }); | ||
|
Comment on lines
23
to
27
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. 🧩 Analysis chainVerify downstream consumers and local user filtering. The typing handler now uses
Run the following script to check how Additionally, clarify:
🏁 Script executed: #!/bin/bash
# Find all consumers of 'user.activity' broadcast events
rg -n -C5 "on\('user\.activity'" --type=ts --type=js
# Also search for any user.activity string references
rg -n -C3 "'user\.activity'|\"user\.activity\"" --type=ts --type=jsLength of output: 1732 🏁 Script executed: #!/bin/bash
set -e
# Show context around the onEvent handler in listeners.module.ts
sed -n '150,230p' apps/meteor/server/modules/listeners/listeners.module.ts
# Find import of notifications
grep -R "import .*notifications" -n apps/meteor/server/modules/listeners/listeners.module.ts
# Search for definition of notifyRoomInThisInstance
rg -n "notifyRoomInThisInstance" -C5 apps/meteor/server/modulesLength of output: 9073 Restore user validation and map 🤖 Prompt for AI Agents |
||
|
|
||
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.
this find was useless since
data.user_idis the same asmatrixUser.username.. we also don't need to check if it exists since this comes from homeserver which already has done validations