Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
Fixed buttons typing animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksymilian Tomczyk authored and Maksymilian Tomczyk committed Jun 17, 2019
1 parent 6b98b8c commit a30d5e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/Sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Sender {

async raw(message) {
try {
if (message.message.text && this.natural_typing) await this.typing.on(message.recipient.id, this.calculateTypingTime(message.message.text))

const text = message.message.text || message.message.attachment.payload.text
if (text && this.natural_typing) await this.typing.on(message.recipient.id, this.calculateTypingTime(text))
const response = await axios.post(this.api_url, message)
this.emitter.emit('request_outgoing', message, response)
this.emitter.emit('message_sent', message, response)
Expand Down

0 comments on commit a30d5e6

Please sign in to comment.