RocketChat / RocketChat/Rocket.Chat

/me slashcommand is no longer working with legacy message parser

Open
#26,927 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

The /me slashcommand is no longer working with legacy message parser. Instead it shows a message with prepending "_ " and appending "_" characters.

Steps to reproduce:
  1. Send message /me is testing.
Expected behavior:

It should display a so-called action:

414b6650a25ed0a11d51a397a40c0ab1

Actual behavior:

Instead it shows a message with prepending "_ " and appending "_" characters.

6420a20d87eb262a7db3ac7790573573

Problem:

⚠️ The space behind the underscore "_ " at the beginning of the message is breaking it. If I edit and fix that message, it will show correctly. Doing str.substring(1) for params in Rocket.Chat/apps/meteor/app/slashcommands-me/server/me.ts might be all that's needed.

Temporary workaround for users:

When trying to send an action, don't use the /me slashcommand but type it in the correct format to be parsed. No spaces before/after the underscores: _me is testing._
We learn that in Rocket.Chat an action is nothing other than a normal message written in italic.

Server Setup Information:
  • Version of Rocket.Chat Server: 5.1.2
  • Operating System: Linux
  • Deployment Method: Docker
  • Number of Running Instances: 1 on this server
  • DB Replicaset Oplog: Unknown
  • NodeJS Version: v14.19.3
  • MongoDB Version: 5.0.12 / wiredTiger (oplog activated)
Client Setup Information
  • Desktop App or Browser Version: Chrome 105.0.5195.127
  • Operating System: Windows 11 Pro (Version 10.0.22000.1042)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/meteor/app/slashcommands-me/server/me.ts and reproduce the issue by sending /me is testing. with the legacy message parser. Inspect how the slash command passes its parameters, then verify that the result renders as an italic action without extra underscore spacing. The issue is old and has had no recent activity, so check for newer related work before starting.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.