|
5 | 5 | import sys
|
6 | 6 | import uuid
|
7 | 7 | from datetime import datetime
|
| 8 | +<<<<<<< HEAD |
| 9 | +======= |
| 10 | +from typing import Dict |
| 11 | +>>>>>>> 63f59b1... adding place holders for samples |
8 | 12 |
|
9 | 13 | from flask import Flask, request, Response
|
10 | 14 | from botbuilder.core import (
|
11 | 15 | BotFrameworkAdapterSettings,
|
12 | 16 | TurnContext,
|
13 | 17 | BotFrameworkAdapter,
|
14 | 18 | )
|
| 19 | +<<<<<<< HEAD |
15 | 20 | from botbuilder.schema import Activity, ActivityTypes
|
16 | 21 |
|
17 | 22 | from bots import TeamsConversationBot
|
| 23 | +======= |
| 24 | +from botbuilder.schema import Activity, ActivityTypes, ConversationReference |
| 25 | + |
| 26 | +from bots import ProactiveBot |
| 27 | +>>>>>>> 63f59b1... adding place holders for samples |
18 | 28 |
|
19 | 29 | # Create the loop and Flask app
|
20 | 30 | LOOP = asyncio.get_event_loop()
|
@@ -56,13 +66,24 @@ async def on_error(context: TurnContext, error: Exception):
|
56 | 66 |
|
57 | 67 | ADAPTER.on_turn_error = on_error
|
58 | 68 |
|
| 69 | +<<<<<<< HEAD |
| 70 | +======= |
| 71 | +# Create a shared dictionary. The Bot will add conversation references when users |
| 72 | +# join the conversation and send messages. |
| 73 | +CONVERSATION_REFERENCES: Dict[str, ConversationReference] = dict() |
| 74 | + |
| 75 | +>>>>>>> 63f59b1... adding place holders for samples |
59 | 76 | # If the channel is the Emulator, and authentication is not in use, the AppId will be null.
|
60 | 77 | # We generate a random AppId for this case only. This is not required for production, since
|
61 | 78 | # the AppId will have a value.
|
62 | 79 | APP_ID = SETTINGS.app_id if SETTINGS.app_id else uuid.uuid4()
|
63 | 80 |
|
64 | 81 | # Create the Bot
|
| 82 | +<<<<<<< HEAD |
65 | 83 | BOT = TeamsConversationBot(APP.config["APP_ID"], APP.config["APP_PASSWORD"])
|
| 84 | +======= |
| 85 | +BOT = ProactiveBot(CONVERSATION_REFERENCES) |
| 86 | +>>>>>>> 63f59b1... adding place holders for samples |
66 | 87 |
|
67 | 88 | # Listen for incoming requests on /api/messages.
|
68 | 89 | @APP.route("/api/messages", methods=["POST"])
|
|
0 commit comments