RocketChat / Rocket.Chat.Go.SDK

Go SDK for REST API and Realtime api
MIT License
59 stars 58 forks source link

Add methods to expand coverage of `channels` endpoints #55

Open evanofslack opened 2 years ago

evanofslack commented 2 years ago

This PR adds methods and tests to cover the following endpoints:

The method for users.info was required to retrieve user IDs for testing of channels.invite.

Additionally, this PR moves groups methods out of the channels file and into a new file.

srrathi commented 2 years ago

@evanofslack just curious to know is there any specific reason to return slice of User addresses in GetChannelMembers function ?

evanofslack commented 2 years ago

@evanofslack just curious to know is there any specific reason to return slice of User addresses in GetChannelMembers function ?

@srrathi The function's intent is to return a slice of models.User, not user addresses.

func (c *Client) GetChannelMembers(channel *models.Channel) ([]*models.User, error) 
srrathi commented 2 years ago

@evanofslack just curious to know is there any specific reason to return slice of User addresses in GetChannelMembers function ?

@srrathi The function's intent is to return a slice of models.User, not user addresses.

func (c *Client) GetChannelMembers(channel *models.Channel) ([]*models.User, error) 

I'm sorry by addresses I mean Pointer. It is returning a slice of models.User pointer. Is there any specific reason for it.

evanofslack commented 2 years ago

@srrathi Only reasoning is that other methods tend to accept pointers and it is easy to dereference if necessary.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: evanofslack
:x: evan slack


evan slack seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.