Rocket.Chat.Apps-engine icon indicating copy to clipboard operation
Rocket.Chat.Apps-engine copied to clipboard

method getDirectByUsernames is missing information of creator of room

Open amit1rana opened this issue 5 years ago • 1 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

amit1rana avatar Oct 22 '20 15:10 amit1rana

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.

lucassartor avatar Feb 20 '21 17:02 lucassartor