Fix bug in isFromAdmin
This commit is contained in:
parent
cea26142e0
commit
644237cf7d
@ -15,7 +15,7 @@ cp = require 'child_process'
|
||||
nope = ['BZBZ 400-BAD-REQUEST', 'BZBZ DOES-NOT-COMPUTE', 'BZBZ ADMIN-NOT-DETECTED', 'BZBZ IS-NOT-AUTHORIZED', 'BZBZ ACCESS-DENIED']
|
||||
|
||||
isFromAdmin = (res) ->
|
||||
res.message.user.room? is process.env.ADMIN_ROOM?.replace(':','#') or res.robot.adapterName is 'shell'
|
||||
res.message.user.room is process.env.ADMIN_ROOM?.replace(':','#') or res.robot.adapterName is 'shell'
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.respond /(?:run|esegui|shell) (git|npm) (.+)/i, (res) ->
|
||||
|
Loading…
Reference in New Issue
Block a user