Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azteam/telegram-api

Package Overview
Dependencies
Maintainers
1
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azteam/telegram-api - npm Package Compare versions

Comparing version 1.1.78 to 1.1.79

23

lib/TelegramAPI.js

@@ -286,20 +286,9 @@ "use strict";

value: function parseMessage(data) {
if (data.callback_query) {
var _data$callback_query = data.callback_query,
from = _data$callback_query.from,
message = _data$callback_query.message;
return {
messageType: _constant.USER_MESSAGE_TYPE.CALLBACK,
userId: from.id,
text: data.callback_query.data,
groupId: message.chat.id,
place: message.chat.type
};
}
var messageData = data.message || data.edited_message;
if (messageData) {
var _from = messageData.from,
var from = messageData.from,
chat = messageData.chat,
text = messageData.text,
entities = messageData.entities;
entities = messageData.entities,
messageId = messageData.message_id;
if (entities) {

@@ -313,3 +302,4 @@ var entity = entities[0];

messageType: _constant.USER_MESSAGE_TYPE.COMMAND,
userId: _from.id,
messageId: messageId,
userId: from.id,
text: parseText,

@@ -325,3 +315,4 @@ groupId: chat.id,

messageType: _constant.USER_MESSAGE_TYPE.TEXT,
userId: _from.id,
messageId: messageId,
userId: from.id,
groupId: chat.id,

@@ -328,0 +319,0 @@ place: chat.type,

{
"name": "@azteam/telegram-api",
"version": "1.1.78",
"version": "1.1.79",
"description": "N/A",

@@ -5,0 +5,0 @@ "keywords": [

@@ -127,17 +127,5 @@ import HttpClient from '@azteam/http-client';

static parseMessage(data) {
if (data.callback_query) {
const {from, message} = data.callback_query;
return {
messageType: USER_MESSAGE_TYPE.CALLBACK,
userId: from.id,
text: data.callback_query.data,
groupId: message.chat.id,
place: message.chat.type,
};
}
const messageData = data.message || data.edited_message;
if (messageData) {
const {from, chat, text, entities} = messageData;
const {from, chat, text, entities, message_id: messageId} = messageData;

@@ -153,2 +141,3 @@ if (entities) {

messageType: USER_MESSAGE_TYPE.COMMAND,
messageId,
userId: from.id,

@@ -165,2 +154,3 @@ text: parseText,

messageType: USER_MESSAGE_TYPE.TEXT,
messageId,
userId: from.id,

@@ -167,0 +157,0 @@ groupId: chat.id,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc