Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webex Teams Adapter Doesn't Support direct_mention Event Type #2221

Open
bbrougher-cerium opened this issue Jun 10, 2022 · 0 comments
Open

Comments

@bbrougher-cerium
Copy link

What was the result you received?

When trying to have my bot respond to a direct_mention event, nothing happened. The event came across into the express server and my controller event was never triggered.

What did you expect?

I expected my controller event handler (snippet below) to run, but nothing happened.

import { Botkit } from "botkit";
import { WebexAdapter } from "botbuilder-adapter-webex";
import { Express } from "express";

const adapter = new WebexAdapter({
  enable_incomplete: true,
  access_token: process.env.ACCESS_TOKEN,
  public_address: process.env.PUBLIC_ADDRESS,
});

const controller = new Botkit({
  webhook_uri: "/api/messages",
  adapter,
});

controller.on("direct_mention",
  async (bot, message): Promise<void> => {
    console.log("Received message: ");
    console.info(message);
    await bot.reply(message, "Hello!");
  }
);

controller.ready(() => {
  console.log("Bot loaded.");
});

const app: Express = controller.webserver;

app.get("/", (req, res) => {
  res.send(`This app is running. Botkit version: ${controller.version}`);
});

Context:

  • Botkit version: 4.15.0
  • Messaging Platform: Webex Teams
  • Node version: v18.0.0
  • OS: Windows
  • Any other relevant information:

I have a PR with some small code changes that seem to be working for my use case that I will submit shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant