1

I'm trying to create a new integration to combine slack with another chat system. If someone sends a message from skype for example, I want his name to be used when the message is sent to slack. Right now I'm using IncomingWebhook to send messages.

private getWebClient(configuration: ConfigurationData): IncomingWebhook {
    return new IncomingWebhook('https://hooks.slack.com/services/...');
}

const webhook = this.getWebClient(configuration);
await webhook.send(
    {
        text: 'How are you today?',
        as_user: false,
        username: 'slack_integration',
        icon_emoji: ':chart_with_upwards_trend:',
        thread_ts: event.ts
    }
);

As you can see, I'm also trying to reply to the message in a thread. This is not working either. The following event I get looks as follows:

{ text: 'How are you today?',
  bot_id: 'B9G8LHME1',
  type: 'message',
  subtype: 'bot_message',
  ts: '1519830326.000061',
  channel: 'C9G4BJ8BW',
  event_ts: '1519830326.000061' }

The message still appears to be from my App. The name is "Slack Integration Test" (with a badge showing App right next to it).

AmazingTurtle
  • 1,187
  • 1
  • 15
  • 31

0 Answers0