@azteam/telegram-api
Advanced tools
Comparing version 1.1.6 to 1.1.7
{ | ||
"name": "@azteam/telegram-api", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
import HttpClient from '@azteam/http-client'; | ||
import { CALLBACK_TYPE } from './constant'; | ||
import { USER_MESSAGE_TYPE } from './constant'; | ||
@@ -57,3 +57,3 @@ class TelegramAPI { | ||
static parseCallback(data) { | ||
static parseMessage(data) { | ||
if (data.callback_query) { | ||
@@ -63,3 +63,3 @@ const { from } = data.callback_query; | ||
return { | ||
callbackType: CALLBACK_TYPE.CALLBACK, | ||
messageType: USER_MESSAGE_TYPE.CALLBACK, | ||
userID: from.id, | ||
@@ -80,3 +80,3 @@ text: data.callback_query.data | ||
return { | ||
callbackType: CALLBACK_TYPE.COMMAND, | ||
messageType: USER_MESSAGE_TYPE.COMMAND, | ||
userID: from.id, | ||
@@ -91,3 +91,3 @@ text: parseText, | ||
return { | ||
callbackType: CALLBACK_TYPE.TEXT, | ||
messageType: USER_MESSAGE_TYPE.TEXT, | ||
userID: from.id, | ||
@@ -94,0 +94,0 @@ text |
3233