RocketChat / RocketChat/Rocket.Chat

Adding name field in u object for Pinned/System Messages

Open
#27,755 3 comments 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:

I am working on this issue in Embedded chat https://github.com/RocketChat/EmbeddedChat/issues/78. My observation is for the other messages there is a name property in u object. But this name is missing for pinned messages or other system messages. So to fix this the API we are using for pinning messages, we can also add u.name property while saving such messages. This could also be extended for other system messages.

Steps to reproduce:
  1. Make changes in pin message API
  2. Add a u.name property in the message
Expected behavior:

Embedded chat can easily get the name of use who pinned the message.

Actual behavior:

Currently we are only getting username

Current behaviour
image

API response of messages for pinned and simple message, in the u object we can see the difference
image
image

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

Trace the pin-message API and the message-saving path described in the issue, then compare the user object on pinned and ordinary messages. Confirm how other system messages are persisted before deciding whether they belong in scope. Done means pinned messages expose the pinner's name in u.name, with the affected message APIs still returning valid responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.