fedimbed: me when i forget how logic
This commit is contained in:
parent
13fd5a9899
commit
a8a95f33a5
1 changed files with 9 additions and 4 deletions
|
@ -724,7 +724,15 @@ async function processUrl(msg, url, spoiler = false) {
|
|||
if (images.length <= 14) {
|
||||
const fourteen = images.slice(10, 14);
|
||||
|
||||
logger.verbose("fedimbed", `fourteen: $(fourteen.length}`);
|
||||
for (const attachment of fourteen) {
|
||||
const embed = Object.assign({}, baseEmbed);
|
||||
embed.image = {
|
||||
url: attachment.url,
|
||||
};
|
||||
embeds.push(embed);
|
||||
}
|
||||
} else if (images.length <= 18) {
|
||||
const fourteen = images.slice(10, 14);
|
||||
|
||||
for (const attachment of fourteen) {
|
||||
const embed = Object.assign({}, baseEmbed);
|
||||
|
@ -732,11 +740,8 @@ async function processUrl(msg, url, spoiler = false) {
|
|||
url: attachment.url,
|
||||
};
|
||||
embeds.push(embed);
|
||||
logger.verbose("fedimbed", "mlem");
|
||||
}
|
||||
}
|
||||
|
||||
if (images.length <= 18) {
|
||||
const eighteen = images.slice(14, 18);
|
||||
const _embed = {
|
||||
color: baseEmbed.color,
|
||||
|
|
Loading…
Reference in a new issue