Skip to content

Commit cc9d7b9

Browse files
committed
Fix deployment permission change commands
1 parent 9163788 commit cc9d7b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/deployments.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module.exports = async function(robot) {
8989
const getUserList = (map, brain) => {
9090
const userids = getMap(map, brain)
9191
return Object.keys(userids)
92-
.map(userid => `• <@${userid}>`)
92+
.map(userid => `• <@!${userid}>`)
9393
.join('\n')
9494
}
9595

@@ -114,7 +114,7 @@ module.exports = async function(robot) {
114114

115115
});
116116

117-
robot.hear(/!deployment admin add @(.+)/, async (res) => {
117+
robot.hear(/!deployment admin add <@!(.+)>/, async (res) => {
118118
const { user } = res.message
119119
const { brain } = robot
120120
// Can't @ users not in a chat with you, so this needs to be in public now
@@ -126,15 +126,15 @@ module.exports = async function(robot) {
126126

127127
if (addUserWithRole(who, 'admin', brain)) {
128128
return res.send(
129-
`I added <@${who}> as a deployment admin.`
129+
`I added <@!${who}> as a deployment admin.`
130130
)
131131
}
132132
return res.send(
133133
'Could not add user as a deployment admin. Maybe they do not exist or are already?'
134134
)
135135
})
136136

137-
robot.hear(/!deployment admin remove @(.+)/, async (res) => {
137+
robot.hear(/!deployment admin remove <@!(.+)>/, async (res) => {
138138
const { user } = res.message
139139
const { brain } = robot
140140

0 commit comments

Comments
 (0)