|
34 | 34 | getchannels(token::String) |
35 | 35 | Takes in the Slack App Auth token and returns a array of channel objects. |
36 | 36 | The main value in a channel object is the Channel ID and name which you |
37 | | -need in order to send threaded messages to Slack. |
| 37 | +need in order to send threaded messages to Slack. |
| 38 | +
|
| 39 | +Tokens can be accessed at "https://api.slack.com/apps/random-letters-and-numbers/oauth?" |
38 | 40 | """ |
39 | 41 | function getchannels(token::String) |
40 | 42 |
|
@@ -98,7 +100,7 @@ function getchannels(token::String) |
98 | 100 | num_members = value |
99 | 101 | elseif occursin("is_im", key) |
100 | 102 | is_im = value |
101 | | - elseif occursin("id", key) |
| 103 | + elseif "id" == key |
102 | 104 | id = value |
103 | 105 | elseif occursin("created", key) |
104 | 106 | created = value |
@@ -132,7 +134,7 @@ function getchannels(token::String) |
132 | 134 | # println("$(key) $(value)") #DEBUG |
133 | 135 | end |
134 | 136 | new_channel = channel(is_private, pending_connected_team_ids, topic, is_archived, is_general, |
135 | | - is_mpim, name, previous_names, num_members, is_im, id[1], created, name_normalized, |
| 137 | + is_mpim, name, previous_names, num_members, is_im, id, created, name_normalized, |
136 | 138 | is_group, purpose, creator, is_channel, pending_shared, is_shared, is_ext_shared, |
137 | 139 | shared_team_ids, is_member, parent_conversation, is_pending_ext_shared, is_org_shared) |
138 | 140 |
|
|
0 commit comments