RocketChat / Rocket.Chat.Apps-engine

The Rocket.Chat Apps engine and definitions.

Home Page:https://rocketchat.github.io/Rocket.Chat.Apps-engine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot get topic from room retrieved using read.getRoomReader().getById(...)

smcardle opened this issue · comments

Hi

I am writing an App that does some checks on messages before they are sent by extending IPreMessageSentExtend.
From the message I get the room read.getRoomReader().getById(message.room.id) and before proceeding I need to check the topic on the room....

This is my problem... There seems to be no way to get the topic set for the room. Is this an oversight in the API ??? as it's clearly a property of the room in the database.

Steve

image

Sorry, I didn't see the topic field for a room. Where did you see it?

image

I see.

Hi Steve!
Now the topic value of a room is called description.
That value was not mapped as a IRoom value, that's why you were unable to get it from a certain room.
I added a PR that resolves that, hope it resolves your issue!