summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nlopes/slack/info.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/nlopes/slack/info.go')
-rw-r--r--vendor/github.com/nlopes/slack/info.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/nlopes/slack/info.go b/vendor/github.com/nlopes/slack/info.go
index 445df832..49db5327 100644
--- a/vendor/github.com/nlopes/slack/info.go
+++ b/vendor/github.com/nlopes/slack/info.go
@@ -198,3 +198,13 @@ func (info Info) GetGroupByID(groupID string) *Group {
}
return nil
}
+
+// GetIMByID returns an IM given an IM id
+func (info Info) GetIMByID(imID string) *IM {
+ for _, im := range info.IMs {
+ if im.ID == imID {
+ return &im
+ }
+ }
+ return nil
+}