0

I am trying to create a bot for jabber and it works fine if i send a message to a user e.g

bot.say(message = {
    text: 'hi',
    user: 'user@domain.com'
})

However when I am trying to do the same thing for a chat room it fails to do so. Do I need a specific JID for the chat room, if so where can I find it? I am currently trying with the following which fails.

bot.say(message = {
    text: 'hi',
    channel: 'roomName@domain.com'
})

This bot is written using botkit in javascript.

Jan
  • 338
  • 3
  • 18

1 Answers1

1
bot.say(message = {
            text: 'hi',
            user: 'j4wteam77161840418404@conference-1-standalonecluster.alpha-cup.cisco.com',
            group: true,
        });

Make sure you have add this bot into the room. The room id is from room information of the pchat room. Remove im: when you copy room link to the code.

pan xin
  • 11
  • 1
  • I have tried the following but unfortunately the message still does not appear in the chat. Maybe I misunderstood something. The bot is added to the room text: 'hi', user: 'room@conference-domain.com', group: true, – Jan Jun 07 '18 at 11:10