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

method getDirectByUsernames is missing information of creator of room

amit1rana opened this issue · comments

The code returns IRoom instance which is missing the creator information.

let myRoom = read.getRoomReader().getDirectByUsernames(usernames);
console.log("Room creator:"+ (directMessageRoom as IRoom).creator);  //undefined

Version of Rocket.Chat Server: 3.8.0-develop

Hi @amit1rana, thanks for creating the issue.

In Rocket.Chat, direct rooms don't have the creator value, that's a normal behavior.
More specific, if you look at the code, you can see that DMs don't have the property u set, so indeed they don't have a creator propertie.
That way, there's actually no issue happening in this case.
Hope that information helps you out! Feel free to ask any question if you want to.