forwarding permissions: possibly prevent some unneccessary loops
This commit is contained in:
parent
ac10e600bf
commit
c4947260f7
1 changed files with 1 additions and 1 deletions
|
@ -412,7 +412,7 @@ function getMessagesNeededForwardPermissions(messages) {
|
||||||
|
|
||||||
var mediaMessageTypes = ["messageAudio", "messageDocument", "messagePhoto", "messageVideo", "messageVideoNote", "messageVoiceNote"];
|
var mediaMessageTypes = ["messageAudio", "messageDocument", "messagePhoto", "messageVideo", "messageVideoNote", "messageVoiceNote"];
|
||||||
var otherMessageTypes = ["messageAnimation", "messageGame", "messageSticker"]
|
var otherMessageTypes = ["messageAnimation", "messageGame", "messageSticker"]
|
||||||
for(var i = 0; i < messages.length; i += 1) {
|
for(var i = 0; i < messages.length && neededPermissions.length < 3; i += 1) {
|
||||||
var type = messages[i]["content"]["@type"];
|
var type = messages[i]["content"]["@type"];
|
||||||
var permission = "";
|
var permission = "";
|
||||||
if(type === "messageText") {
|
if(type === "messageText") {
|
||||||
|
|
Loading…
Reference in a new issue