0

Could someone help me with this newbie question?

I'm trying to set the Bot presence using setPresence node, but without success until now. I tried a lot of ways to pass the presence state, but didn't work.

Do you know what I'm doing wrong?

tks

msg.payload = { presence: { presenceState: { state: "AVAILABLE" } } }

msg.payload = { presence: { state: "AVAILABLE" } }

msg.payload = { presence: { presence: { state: "AVAILABLE" } } }

1 Answers1

0

The second example you have there looks like it should work. The code below works for me. You can look at the different states here: https://circuitsandbox.net/sdk/classes/PresenceState.html .

msg.payload = {
    presence: {
        state: Math.random() > .5 ? 'AWAY' : 'AVAILABLE'
    }
}
return msg;