Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

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

@bbrougher-cerium

Description

@bbrougher-cerium

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions