Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ((() => {
- // First I store the reference from the first inbox
- server.post('/api/messages', (req, res) => {
- adapter.processActivity(req, res, async (context) => {
- const reference = TurnContext.getConversationReference(context.activity);
- // Call the function that sends message within an interval
- sendMessageNow(reference);
- })
- })
- // Secondly I use the reference to continue the conversation
- function sendMessageNow() {
- setInterval(async () => {
- await adapter.continueConversation(JSON.parse(reference), async (context) => {
- await context.sendActivity("Sending a new message");
- });
- }, 5000);
- }
- })())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement