Hubot - Botframework - MS Teams - Не отвечает - PullRequest
0 голосов
/ 25 июня 2019

Я создал Hubot на основе localhost и использовал Botframework в качестве адаптера.Я создал учетную запись MS Bot.Я также создал новое приложение с помощью студии приложений в MS Teams.Я тогда сбоку загрузил его.Я начал ngrok, и я все начал.Я вижу, что бот онлайн в командах.Но когда я послал команду боту, он принимает сообщение, но не отвечает.В журнале это выглядит так, как будто он отвечает, но я не вижу ответа в канале Команды или @mention.Пожалуйста, смотрите журнал ниже

[Mon Jun 24 2019 17:39:51 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
[Mon Jun 24 2019 17:39:51 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: TextMiddleware toReceivable
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: onBotEvents
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: Handling activity Channel: msteams; type: message
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-msteams: toReceivable
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: send
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: reply
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
[Mon Jun 24 2019 17:39:57 GMT-0400 (Eastern Daylight Time)] INFO hubot-msteams: toSendable
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: onBotEvents
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: Handling activity Channel: msteams; type: message
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-msteams: toReceivable
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: send
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: reply
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-msteams: toSendable
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: send
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: reply
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
[Mon Jun 24 2019 17:40:36 GMT-0400 (Eastern Daylight Time)] INFO hubot-msteams: toSendable

Манифест приложения:

{
    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
    "manifestVersion": "1.5",
    "version": "1.0.0",
    "id": "xxxxxxxx",
    "packageName": "com.tech.bot",
    "developer": {
        "name": "user",
        "websiteUrl": "https://mm.com",
        "privacyUrl": "https://mm.com/privacy",
        "termsOfUseUrl": "https://mm.com/terms"
    },
    "icons": {
        "color": "color.png",
        "outline": "outline.png"
    },
    "name": {
        "short": "techbot",
        "full": ""
    },
    "description": {
        "short": "bot for techbot",
        "full": "bot for techbot"
    },
    "accentColor": "#FFFFFF",
    "bots": [
        {
            "botId": "xxxxxxxxd",
            "scopes": [
                "personal",
                "team",
                "groupchat"
            ],
            "commandLists": [
                {
                    "scopes": [
                        "personal"
                    ],
                    "commands": [
                        {
                            "title": "hi",
                            "description": "How are u!!!"
                        }
                    ]
                },
                {
                    "scopes": [
                        "team"
                    ],
                    "commands": [
                        {
                            "title": "hi",
                            "description": "Greet!!!"
                        },
                        {
                            "title": "hi",
                            "description": "How are u!!!"
                        }
                    ]
                },
                {
                    "scopes": [
                        "groupchat"
                    ],
                    "commands": [
                        {
                            "title": "hi",
                            "description": "Greet!!!"
                        },
                        {
                            "title": "hi",
                            "description": "How are u!!!"
                        }
                    ]
                }
            ],
            "supportsFiles": false,
            "isNotificationOnly": false
        }
    ],
    "permissions": [
        "identity",
        "messageTeamMembers"
    ],
    "validDomains": []
}

Журнал отладки показывает ниже

  express:router dispatching POST /api/messages +44s
  express:router query  : /api/messages +0ms
  express:router expressInit  : /api/messages +0ms
  express:router <anonymous>  : /api/messages +1ms
  express:router query  : /api/messages +0ms
  express:router jsonParser  : /api/messages +0ms
  body-parser:json content-type "application/json; charset=utf-8" +0ms
  body-parser:json content-encoding "identity" +1ms
  body-parser:json read body +0ms
  body-parser:json parse body +0ms
  body-parser:json parse json +0ms
  express:router urlencodedParser  : /api/messages +0ms
  body-parser:urlencoded body already parsed +0ms
  express:router multipart  : /api/messages +0ms
[Wed Jun 26 2019 08:33:32 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: onBotEvents
[Wed Jun 26 2019 08:33:32 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-adapter: Handling activity Channel:                            msteams; type: message
[Wed Jun 26 2019 08:33:32 GMT-0400 (Eastern Daylight Time)] INFO hubot-botframework-middleware: creating middleware...
  finalhandler cannot 404 after headers sent +6ms
...