-
Notifications
You must be signed in to change notification settings - Fork 13.5k
chore(message-parser): remove orphaned i18next pluralization TODO from Reaction component #39944
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
base: develop
Are you sure you want to change the base?
Changes from all commits
17e8a2a
b9de355
df853df
cad1521
646c58a
974855a
cc2a576
3111f58
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| **/.classpath | ||
| **/.dockerignore | ||
| **/.env | ||
| **/.git | ||
| **/.gitignore | ||
| **/.project | ||
| **/.settings | ||
| **/.toolstarget | ||
| **/.vs | ||
| **/.vscode | ||
| **/*.*proj.user | ||
| **/*.dbmdl | ||
| **/*.jfm | ||
| **/charts | ||
| **/docker-compose* | ||
| **/compose* | ||
| **/Dockerfile* | ||
| **/node_modules | ||
| **/npm-debug.log | ||
| **/obj | ||
| **/secrets.dev.yaml | ||
| **/values.dev.yaml | ||
| LICENSE | ||
| README.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "configurations": [ | ||
| { | ||
| "name": "Containers: Node.js Launch", | ||
| "type": "docker", | ||
| "request": "launch", | ||
| "preLaunchTask": "docker-run: debug", | ||
| "platform": "node" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "type": "docker-build", | ||
| "label": "docker-build", | ||
| "platform": "node", | ||
| "dockerBuild": { | ||
| "dockerfile": "${workspaceFolder}/Dockerfile", | ||
| "context": "${workspaceFolder}", | ||
| "pull": true | ||
| } | ||
| }, | ||
| { | ||
| "type": "docker-run", | ||
| "label": "docker-run: release", | ||
| "dependsOn": [ | ||
| "docker-build" | ||
| ], | ||
| "platform": "node" | ||
| }, | ||
| { | ||
| "type": "docker-run", | ||
| "label": "docker-run: debug", | ||
| "dependsOn": [ | ||
| "docker-build" | ||
| ], | ||
| "dockerRun": { | ||
| "env": { | ||
| "DEBUG": "*", | ||
| "NODE_ENV": "development" | ||
| } | ||
| }, | ||
| "node": { | ||
| "enableDebugging": true | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| FROM node:lts-alpine | ||
| ENV NODE_ENV=production | ||
| WORKDIR /usr/src/app | ||
| COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] | ||
| RUN npm install --production --silent && mv node_modules ../ | ||
| COPY . . | ||
| EXPOSE 3000 | ||
| RUN chown -R node /usr/src/app | ||
| USER node | ||
| CMD ["node", "index.js"] | ||
|
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 chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== root index.js existence check =="
fd -a '^index\.js$' .
echo "== possible startup scripts in package.json =="
rg -n '"scripts"\s*:|"start"\s*:|"dev"\s*:|"build"\s*:' package.json -A20Repository: RocketChat/Rocket.Chat Length of output: 2796 🏁 Script executed: #!/bin/bash
# Get full Dockerfile context to understand the image purpose and any build steps
fd -a 'Dockerfile' . | head -20Repository: RocketChat/Rocket.Chat Length of output: 556 🏁 Script executed: # Read the Dockerfile to see the full context around line 10
cat -n Dockerfile 2>/dev/null || echo "Dockerfile not found in root"Repository: RocketChat/Rocket.Chat Length of output: 423 🏁 Script executed: # Search for Meteor-specific startup or build configurations
rg -i 'meteor|start|entry' package.json -B2 -A5 | head -50Repository: RocketChat/Rocket.Chat Length of output: 1013 🏁 Script executed: # Check if there are build artifacts or dist directories that might contain index.js
fd -a 'index\.js$' . -type f | grep -E '(dist|build|\.meteor|bundle)' | head -20Repository: RocketChat/Rocket.Chat Length of output: 236 🏁 Script executed: # Read one of the service Dockerfiles to see the correct pattern
head -20 /home/jailuser/git/ee/apps/account-service/DockerfileRepository: RocketChat/Rocket.Chat Length of output: 754 🏁 Script executed: # Search for any references to index.js as an entry point in build or CI configs
rg 'index\.js' --max-count=10 -B3 -A3Repository: RocketChat/Rocket.Chat Length of output: 30061 🏁 Script executed: # Check if there's a meteor build configuration or output directory
find . -maxdepth 3 -name '.meteor' -type d 2>/dev/null || echo "No .meteor directories in first 3 levels"Repository: RocketChat/Rocket.Chat Length of output: 87 🏁 Script executed: # Look for build output or dist directories that might contain index.js
ls -la apps/meteor/ 2>/dev/null | head -20Repository: RocketChat/Rocket.Chat Length of output: 1339 The Dockerfile entry point will fail at container startup—no root Line 10 hardcodes 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -278,6 +278,31 @@ export async function sendMessageNotifications(message: IMessage, room: IRoom, u | |||||||||
| } | ||||||||||
|
|
||||||||||
| const sender = await roomCoordinator.getRoomDirectives(room.t).getMsgSender(message); | ||||||||||
|
|
||||||||||
| const reasons: any[] = []; | ||||||||||
|
|
||||||||||
| if (message.msg && message.msg.length > 200) { | ||||||||||
| reasons.push({ | ||||||||||
| type: 'long_message', | ||||||||||
| message: 'Message unusually long (possible spam)', | ||||||||||
| }); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if (/(.)\1{5,}/.test(message.msg || '')) { | ||||||||||
| reasons.push({ | ||||||||||
| type: 'repetition', | ||||||||||
| message: 'Repeated characters detected', | ||||||||||
| }); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if (reasons.length > 0) { | ||||||||||
| (message as any).moderationReasons = reasons; | ||||||||||
|
|
||||||||||
|
Comment on lines
+282
to
+300
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 chain🏁 Script executed: #!/bin/bash
# Verify whether IMessage officially includes moderationReasons
ast-grep --pattern $'interface IMessage {\n $$$\n moderationReasons: $_\n $$$\n}'
# Locate all usages/assumptions of moderationReasons in TS sources
rg -n --type=ts -C3 '\bmoderationReasons\b'Repository: RocketChat/Rocket.Chat Length of output: 681 Remove the Lines 299 and 282: The code mutates Define 🤖 Prompt for AI Agents |
||||||||||
| console.log('Moderation reasoning:', { | ||||||||||
| userId: message.u?._id ?? 'unknown', | ||||||||||
| reasons, | ||||||||||
| }); | ||||||||||
|
Comment on lines
+301
to
+304
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. Remove raw Line 301 logs user-related data in a hot path and can create noisy, unstructured production logs. Suggested minimal change- console.log('Moderation reasoning:', {
- userId: message.u?._id ?? 'unknown',
- reasons,
- });📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| } | ||||||||||
| if (!sender) { | ||||||||||
| return message; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export function escapeRegExp(value: string): string { | ||
| return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | ||
| } |
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.
🧩 Analysis chain
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 386
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 3009
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 635
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 2171
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 146
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 2810
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 710
Use Yarn v4 and fix missing entrypoint in Dockerfile.
Lines 4-5 use npm despite this repo declaring
"packageManager": "yarn@4.12.0"with.yarnrc.yml. This breaks workspace resolution and reproducibility in the container.Additionally, line 10 runs
node index.js, but that file does not exist in the repo. The container will fail at startup.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents