Message: Fix error due to unsupported messages in albums (#2007)

This commit is contained in:
Alexander Zinchuk 2022-08-18 19:42:53 +02:00
parent 84e8c06a63
commit 09c787c690

View File

@ -349,7 +349,8 @@ const Message: FC<OwnProps & StateProps> = ({
&& !forwardInfo.isLinkedChannelPost
&& !customShape
);
const isAlbum = Boolean(album) && album!.messages.length > 1;
const isAlbum = Boolean(album) && album!.messages.length > 1
&& !album?.messages.some((msg) => Object.keys(msg.content).length === 0);
const isInDocumentGroupNotFirst = isInDocumentGroup && !isFirstInDocumentGroup;
const isInDocumentGroupNotLast = isInDocumentGroup && !isLastInDocumentGroup;
const isContextMenuShown = contextMenuPosition !== undefined;