bora89
bora89

Reputation: 3609

Capture all messages between members in a channel

The goal is to save all the dialog between one channel members (e.g. MS Teams) and then send it to another channel.

Is that possible to capture all messages between channel members by sideloaded bot or something?

I used that code from documentation:

const logUserConversation = (event) => {
    console.log('message: ' + event.text + ', user: ' + event.address.user.name);
};

// Middleware for logging
bot.use({
    receive: function (event, next) {
        logUserConversation(event);
        next();
    },
    send: function (event, next) {
        logUserConversation(event);
        next();
    }
});

But it triggers only if you directly @mentioning the bot, no action if conversation going on between the channel members. I suspect that it could be the security policy of the bot framework and it is not possible at all...

Any thoughts?

UPDATE: Ok, a support member said to me that the ability to do so is on the roadmap, it will be available later with Graph API.

Upvotes: 1

Views: 199

Answers (1)

Ezequiel Jadib
Ezequiel Jadib

Reputation: 14787

I don't think that's possible at all. You can log the messages between users and the bot; but not the messages between users even if the bot is in the channel where the conversation is happening.

Upvotes: 7

Related Questions