Skip to content

Commit

Permalink
Merge pull request #9 from frankemax/add-bot-role
Browse files Browse the repository at this point in the history
feat(role): add bot role
  • Loading branch information
fcecagno authored Nov 3, 2021
2 parents 3e57a9a + 4c40925 commit 459126b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions messageMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ module.exports = class MessageMapping {
"ts": Date.now()
}
};
if (msgBody.bot) {
this.mappedObject.data["attributes"]["user"]["role"] = 'BOT';
}
if (this.mappedObject.data["id"] === "user-audio-voice-enabled") {
this.mappedObject.data["attributes"]["user"]["listening-only"] = msgBody.listenOnly;
this.mappedObject.data["attributes"]["user"]["sharing-mic"] = ! msgBody.listenOnly;
Expand Down

0 comments on commit 459126b

Please sign in to comment.