Rocket.Chat.Apps-engine
Rocket.Chat.Apps-engine copied to clipboard
method getDirectByUsernames is missing information of creator of room
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.