Skip to content

Commit

Permalink
Улучшения
Browse files Browse the repository at this point in the history
  • Loading branch information
egorprnn committed Aug 3, 2020
1 parent 16d201b commit b9d5732
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/Handler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ export class Handler {
.then(({ groups, profiles, items }) => {

if (groups.length > 0 && (groupIdMatch || !userIdMatch)) { // Устанавливаем footer от типа отправителя записи
const [group] = groups;
const [{ name, photo_50 }] = groups;

sender.builder.setFooter(group.name, group.photo_50);
sender.builder.setFooter(name, photo_50);
} else if (profiles.length > 0) {
const [profile] = profiles;
const [{ first_name, last_name, photo_50 }] = profiles;

sender.builder.setFooter(`${profile.first_name} ${profile.last_name}`, profile.photo_50);
sender.builder.setFooter(`${first_name} ${last_name}`, photo_50);
}

const [post1, post2] = items;
Expand Down

0 comments on commit b9d5732

Please sign in to comment.