Skip to content

Commit 2c61e81

Browse files
author
Karim Nahas
committed
Added explanation
1 parent b19f03c commit 2c61e81

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

info.go

+9
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,15 @@ type Icons struct {
431431

432432
// Info contains various details about the authenticated user and team.
433433
// It is returned by StartRTM or included in the "ConnectedEvent" RTM event.
434+
// It should be noted that in order to optimise the sync speed, RTMConnect
435+
// (which uses "rtm.connect") does not get all the account information. Namely,
436+
// channels, groups, mpims, ims, users and bots are left empty.
437+
// If you want to have access these fields populated, you should use "rtm.start"
438+
// instead. Sample code bellow:
439+
// ```
440+
// rtm := slack.NewRTM(slack.RTMOptionUseStart(true))
441+
// go rtm.ManageConnection()
442+
// ```
434443
type Info struct {
435444
URL string `json:"url,omitempty"`
436445
User *UserDetails `json:"self,omitempty"`

0 commit comments

Comments
 (0)