Skip to content

Comments

Add REST API method to list online users in a room#5502

Merged
engelgabriel merged 6 commits intoRocketChat:developfrom
wtsarchive:develop
Feb 9, 2017
Merged

Add REST API method to list online users in a room#5502
engelgabriel merged 6 commits intoRocketChat:developfrom
wtsarchive:develop

Conversation

@wtsarchive
Copy link
Contributor

@RocketChat/core

This pull request re-implements the API method to get online users in a room. It was already implemented by #2918 but it got lost when moving the api to /v1 namespace.

@CLAassistant
Copy link

CLAassistant commented Jan 11, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@graywolf336 graywolf336 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this pull request, I apologize for missing this route when I moved what I thought was everything over.

get: function() {
const room = findChannelById(this.queryParams.roomId);

if (room.statusCode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge the latest code? As this line of code isn't needed any more.

}
});

RocketChat.API.v1.addRoute('channels.online', { authRequired: true }, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this to the groups as well? And if you're up for it, create the documentation on this over on our docs? https://github.com/RocketChat/Rocket.Chat.Docs/tree/master/6.%20Developer%20Guides/REST%20API

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@engelgabriel engelgabriel modified the milestones: 0.50.0, Short-term Jan 24, 2017
@engelgabriel
Copy link
Member

@graywolf336 can you do the sync so we can merge this?

@rodrigok
Copy link
Member

rodrigok commented Feb 8, 2017

@graywolf336 Can you review this again?

@graywolf336
Copy link
Contributor

@rodrigok What would you think about changing it from just username to include the user's id as well?

@rodrigok
Copy link
Member

rodrigok commented Feb 8, 2017

@graywolf336 Done :)

@engelgabriel engelgabriel modified the milestones: 0.52.0, Short-term Feb 9, 2017
@engelgabriel engelgabriel merged commit 9a090d1 into RocketChat:develop Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants