Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User member is pointer in TeamJoinEvent #30

Closed
dvdplm opened this issue Jul 14, 2015 · 3 comments
Closed

User member is pointer in TeamJoinEvent #30

dvdplm opened this issue Jul 14, 2015 · 3 comments

Comments

@dvdplm
Copy link
Contributor

dvdplm commented Jul 14, 2015

Hi,
I just noticed an inconsistency where the UserChangeEvent includes a User(https://github.com/nlopes/slack/blob/master/websocket_misc.go#L40) whereas TeamJoinEvent uses a *User (https://github.com/nlopes/slack/blob/master/websocket_teams.go#L5). Not sure which is better but it'd be great if it was consistent! :)

@joefitzgerald
Copy link
Contributor

I think this all depends on whether the user is a required field or an optional field. If it's required, it should not be a pointer. If it's optional, it should be a pointer.

@dvdplm
Copy link
Contributor Author

dvdplm commented Jul 15, 2015

Not sure how you mean "required": it's data sent by Slack (always present for both events and probably for others too) so there's nothing optional about it.

dvdplm referenced this issue in dvdplm/slack Jan 30, 2016
For consistency and Least Surprise it's nice if the TeamJoinEvent also returns a `User`.
See https://github.com/nlopes/slack/issues/30
@nlopes
Copy link
Collaborator

nlopes commented Mar 5, 2016

I think the omitempty should also go as they are always present for both events (I just confirmed this).

@dvdplm dvdplm closed this as completed May 13, 2016
zchee pushed a commit to zchee/slack that referenced this issue Oct 16, 2019
Implement RTM ping/pong, and error handling
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

No branches or pull requests

3 participants