|
|
@ -1258,6 +1258,10 @@ angular.module('myApp.services') |
|
|
|
if (!options.viaBotID) { |
|
|
|
if (!options.viaBotID) { |
|
|
|
text = RichTextProcessor.parseMarkdown(text, entities) |
|
|
|
text = RichTextProcessor.parseMarkdown(text, entities) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!text.length) { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var sendEntites = entities |
|
|
|
var sendEntites = entities |
|
|
|
if (entities.length) { |
|
|
|
if (entities.length) { |
|
|
|
sendEntites = angular.copy(entities) |
|
|
|
sendEntites = angular.copy(entities) |
|
|
@ -1269,9 +1273,6 @@ angular.module('myApp.services') |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!text.length) { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var messageID = tempID-- |
|
|
|
var messageID = tempID-- |
|
|
|
var randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)] |
|
|
|
var randomID = [nextRandomInt(0xFFFFFFFF), nextRandomInt(0xFFFFFFFF)] |
|
|
@ -1319,7 +1320,7 @@ angular.module('myApp.services') |
|
|
|
reply_to_msg_id: replyToMsgID, |
|
|
|
reply_to_msg_id: replyToMsgID, |
|
|
|
via_bot_id: options.viaBotID, |
|
|
|
via_bot_id: options.viaBotID, |
|
|
|
reply_markup: options.reply_markup, |
|
|
|
reply_markup: options.reply_markup, |
|
|
|
entities: sendEntites, |
|
|
|
entities: entities, |
|
|
|
views: asChannel && 1, |
|
|
|
views: asChannel && 1, |
|
|
|
pending: true |
|
|
|
pending: true |
|
|
|
} |
|
|
|
} |
|
|
@ -1367,7 +1368,7 @@ angular.module('myApp.services') |
|
|
|
id: options.resultID |
|
|
|
id: options.resultID |
|
|
|
}, sentRequestOptions) |
|
|
|
}, sentRequestOptions) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (entities.length) { |
|
|
|
if (sendEntites.length) { |
|
|
|
flags |= 8 |
|
|
|
flags |= 8 |
|
|
|
} |
|
|
|
} |
|
|
|
apiPromise = MtpApiManager.invokeApi('messages.sendMessage', { |
|
|
|
apiPromise = MtpApiManager.invokeApi('messages.sendMessage', { |
|
|
@ -1376,7 +1377,7 @@ angular.module('myApp.services') |
|
|
|
message: text, |
|
|
|
message: text, |
|
|
|
random_id: randomID, |
|
|
|
random_id: randomID, |
|
|
|
reply_to_msg_id: AppMessagesIDsManager.getMessageLocalID(replyToMsgID), |
|
|
|
reply_to_msg_id: AppMessagesIDsManager.getMessageLocalID(replyToMsgID), |
|
|
|
entities: entities |
|
|
|
entities: sendEntites |
|
|
|
}, sentRequestOptions) |
|
|
|
}, sentRequestOptions) |
|
|
|
} |
|
|
|
} |
|
|
|
// console.log(flags, entities)
|
|
|
|
// console.log(flags, entities)
|
|
|
|