Function
fetchMessage
(
channel: string,
token: string,
messageTs: string
)
Source from the content-addressed store, hash-verified
| 92 | }; |
| 93 | |
| 94 | export const fetchMessage = async ( |
| 95 | channel: string, |
| 96 | token: string, |
| 97 | messageTs: string |
| 98 | ) => { |
| 99 | let url = |
| 100 | 'https://slack.com/api/conversations.history?channel=' + |
| 101 | channel + |
| 102 | '&latest=' + |
| 103 | messageTs + |
| 104 | '&limit=1'; |
| 105 | |
| 106 | const response = await request |
| 107 | .get(url) |
| 108 | .set('Authorization', 'Bearer ' + token); |
| 109 | |
| 110 | return response; |
| 111 | }; |
| 112 | |
| 113 | export const fetchTeamInfo = async (token: string) => { |
| 114 | const url = 'https://slack.com/api/team.info'; |
Callers
nothing calls this directly
Tested by
no test coverage detected