Rocket.Chat.Go.SDK icon indicating copy to clipboard operation
Rocket.Chat.Go.SDK copied to clipboard

Adding function to get group and channel members

Open srrathi opened this issue 2 years ago • 1 comments

Problem Function to get group members already exist in https://github.com/RocketChat/Rocket.Chat.Go.SDK/blob/master/rest/group.go#L45 but the problem with this is it's only for fetching group members. We cannot get channel members through as it have different rest endpoint.

Solution I'm thinking of to make this function a more generalised function to fetch both group and channel members and we can differentiate between them through type of the room and according to the type it will fetch members from the respected endpoint and just return the members.

Discuss @geekgonecrazy Should I make it a common function as I said to get both group and channel members or made separate functions for both group and channel in their respective file and call them individually while using according to the type of room ?

srrathi avatar Nov 26 '22 22:11 srrathi

I think current design separates between the two, I think the api endpoints is separate as well. Might should follow so those looking at docs for api methods can translate easily

geekgonecrazy avatar Dec 06 '22 23:12 geekgonecrazy