Send related emoji along with Sticker, fix SendMessage types

This commit is contained in:
Scott Nonnenberg 2021-10-05 15:10:08 -07:00 committed by GitHub
parent 3c91dce993
commit bd380086a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 522 additions and 376 deletions

View file

@ -2,8 +2,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { IMAGE_JPEG, VIDEO_MP4 } from '../../types/MIME';
import { AttachmentType } from '../../types/Attachment';
import { VIDEO_MP4 } from '../../types/MIME';
import { fakeAttachment } from '../helpers/fakeAttachment';
import { shouldUseFullSizeLinkPreviewImage } from '../../linkPreviews/shouldUseFullSizeLinkPreviewImage';
@ -15,17 +16,6 @@ describe('shouldUseFullSizeLinkPreviewImage', () => {
isStickerPack: false,
};
const fakeAttachment = (
overrides: Partial<AttachmentType> = {}
): AttachmentType => ({
contentType: IMAGE_JPEG,
fileName: 'foo.jpg',
url: '/tmp/foo.jpg',
width: 800,
height: 600,
...overrides,
});
it('returns false if there is no image', () => {
assert.isFalse(
shouldUseFullSizeLinkPreviewImage({