Skip to content

Commit

Permalink
Only log debug messages when updating/deleting messages
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhammond committed Feb 2, 2015
1 parent 7bf952d commit bdfb0fa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/message.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ class Message
"channel": @channel,
"text": new_text
}
@_client.logger.debug "Sending message change request"
@_client.logger.debug params
if @ts then @_client._apiCall "chat.update", params, @_onUpdateMessage
if @ts
@_client.logger.debug "Sending message change request"
@_client.logger.debug params
@_client._apiCall "chat.update", params, @_onUpdateMessage

_onUpdateMessage: (data) ->
@_client.logger.debug data
Expand All @@ -75,9 +76,10 @@ class Message
"ts": @ts,
"channel": @channel,
}
@_client.logger.debug "Sending message delete request"
@_client.logger.debug params
if @ts then @_client._apiCall "chat.delete", params, @_onDeleteMessage
if @ts
@_client.logger.debug "Sending message delete request"
@_client.logger.debug params
@_client._apiCall "chat.delete", params, @_onDeleteMessage

_onDeleteMessage: (data) ->
@_client.logger.debug data
Expand Down

0 comments on commit bdfb0fa

Please sign in to comment.