Shiyinq / anonim-chat

🎭 Anonymously chat with a stranger.
GNU General Public License v3.0
43 stars 26 forks source link

Bad Request: type of file mismatch for SendAudio #1

Closed jalil229 closed 2 years ago

jalil229 commented 2 years ago

When a user sends a VoiceNote at that time the server was disconnected

response: {
    ok: false,
    error_code: 400,
    description: 'Bad Request: type of file mismatch'
  },
  on: {
    method: 'sendAudio',
    payload: {
      chat_id: 1054010676,
      audio: 'AwACAgUAAGyOyJuvAAFhzfwmi3VCYIDBQAC77cxkBAAID4mJQiT5j42wVs_WFb3c9bAAASME'
    }
  }
}

Node.js v17.8.0
[nodemon] app crashed - waiting for file changes before starting...
Shiyinq commented 2 years ago

i think this issue came from the library telegraf so i decide to open issue on their repo https://github.com/telegraf/telegraf/issues/1600

Shiyinq commented 2 years ago

for now maybe we can disable this feature and send user the warning when their send voice note

MKRhere commented 2 years ago

https://github.com/Shiyinq/anonim-chat/blob/fbd9825f1247df7e85ca3eb3d391e0ab2a790b84/matchmaker.js#L158=

Needs to be tg.sendVoice

Shiyinq commented 2 years ago

https://github.com/Shiyinq/anonim-chat/blob/fbd9825f1247df7e85ca3eb3d391e0ab2a790b84/matchmaker.js#L158=

Needs to be tg.sendVoice

thank you @MKRhere

my bad didn't check doc first

Shiyinq commented 2 years ago

https://github.com/Shiyinq/anonim-chat/commit/8c6f5c590d711d03cd389925cfc05e8869354cf2