Fix: parser
This commit is contained in:
+3
-1
@@ -40,7 +40,7 @@ const Parser: parserType = (data, type, endpoint) => {
|
||||
if (type === "request") {
|
||||
if (result.media && result.text && endpoint === "ueuse/create") {
|
||||
if (result.media.photo) {
|
||||
for (let i = 0; i < result.media.photo.length; i++) {
|
||||
for (let i = 0; i < result.media.photo.length; i++) {
|
||||
result[`photo${i + 1}`] = result.media.photo[i];
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,8 @@ const Parser: parserType = (data, type, endpoint) => {
|
||||
result[`video${i + 1}`] = result.media.video[i];
|
||||
}
|
||||
}
|
||||
|
||||
delete result.media;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user