@@ -12,12 +12,6 @@ const createCallSlackHookAPI = async (
1212 const { _, $0, ...args } = await yargs ( ) . parse ( req . body . text || '' ) ;
1313 const queryParams = new URLSearchParams ( args as Record < string , string > ) ;
1414
15- // handle the special case /pronto --edges
16- if ( queryParams . get ( 'edges' ) ) {
17- const message = await listAvailableEdges ( ) ;
18- return res . status ( 200 ) . json ( message ) ;
19- }
20-
2115 try {
2216 const cid = queryParams . get ( 'cid' ) ;
2317 if ( cid ) {
@@ -100,36 +94,4 @@ const notifyError = (message: string) => {
10094 } ;
10195} ;
10296
103- const listAvailableEdges = async ( ) => {
104- const chunkedMessages = [
105- `
106- Static edges:
107- sfu-000c954.fdc-ams1.stream-io-video.com
108- sfu-039364a.lsw-ams1.stream-io-video.com
109- sfu-9c050b4.ovh-lon1.stream-io-video.com
110- sfu-9c0dc03.ovh-lim1.stream-io-video.com
111- sfu-9f0306f.eqx-nyc1.stream-io-video.com
112- sfu-a69b58a.blu-tal1.stream-io-video.com
113- sfu-e74550c.aws-sin1.stream-io-video.com
114- sfu-f079b1a.dpk-den1.stream-io-video.com
115- sfu-dd73d37.aws-mum1.stream-io-video.com
116- ` ,
117- ] ;
118-
119- // https://app.slack.com/block-kit-builder/
120- // useful too for testing the formatting of the Slack messages
121- return {
122- response_type : 'ephemeral' , // notify just the initiator
123- blocks : chunkedMessages . map ( ( msg ) => {
124- return {
125- type : 'section' ,
126- text : {
127- type : 'mrkdwn' ,
128- text : `Available edges: \`\`\`${ msg . trim ( ) } \`\`\`` ,
129- } ,
130- } ;
131- } ) ,
132- } ;
133- } ;
134-
13597export default createCallSlackHookAPI ;
0 commit comments