@@ -94,9 +94,9 @@ module.exports = (robot) => {
9494 title = `Dashboards tagged \`${ tag } \`:\n` ;
9595 }
9696
97- service . search ( null , tag ) . then ( ( dashboards ) => {
97+ service . search ( null , tag ) . then ( async ( dashboards ) => {
9898 if ( dashboards == null ) return ;
99- return sendDashboardList ( dashboards , title , context ) ;
99+ await sendDashboardList ( dashboards , title , context ) ;
100100 } ) ;
101101 } ) ;
102102
@@ -108,10 +108,10 @@ module.exports = (robot) => {
108108 const query = msg . match [ 1 ] . trim ( ) ;
109109 robot . logger . debug ( query ) ;
110110
111- service . search ( query ) . then ( ( dashboards ) => {
111+ service . search ( query ) . then ( async ( dashboards ) => {
112112 if ( dashboards == null ) return ;
113113 const title = `Dashboards matching \`${ query } \`:\n` ;
114- return sendDashboardList ( dashboards , title , msg ) ;
114+ await sendDashboardList ( dashboards , title , msg ) ;
115115 } ) ;
116116 } ) ;
117117
@@ -160,11 +160,11 @@ module.exports = (robot) => {
160160 const paused = msg . match [ 1 ] === 'pause' ;
161161 const alertId = msg . match [ 2 ] ;
162162
163- const message = service . pauseSingleAlert ( alertId , paused ) ;
164-
165- if ( message ) {
166- msg . send ( message ) ;
167- }
163+ service . pauseSingleAlert ( alertId , paused ) . then ( ( message ) => {
164+ if ( message ) {
165+ msg . send ( message ) ;
166+ }
167+ } ) ;
168168 } ) ;
169169
170170 // Pause/unpause all alerts
0 commit comments