Add attachment support to mock tests

This commit is contained in:
trevor-signal 2024-08-01 20:06:52 -04:00 committed by GitHub
parent 6940c532ea
commit 9010245083
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 252 additions and 11 deletions

View file

@ -139,12 +139,14 @@ export function sendTextMessage({
from,
to,
text,
attachments,
desktop,
timestamp = Date.now(),
}: {
from: PrimaryDevice;
to: PrimaryDevice | Device | GroupInfo;
text: string;
attachments?: Array<Proto.IAttachmentPointer>;
desktop: Device;
timestamp?: number;
}): Promise<void> {
@ -158,6 +160,7 @@ export function sendTextMessage({
to: to as PrimaryDevice,
dataMessage: {
body: text,
attachments,
timestamp: Long.fromNumber(timestamp),
groupV2: groupInfo
? {