fix messaging messages with multiple recipients

instead of returning early, this should only return after all messaging
messages have been created
This commit is contained in:
Johann150 2023-05-28 23:25:19 +02:00
parent c9df2fd060
commit bda8488194
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -243,8 +243,8 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
if (isTalk) { if (isTalk) {
for (const recipient of visibleUsers) { for (const recipient of visibleUsers) {
await createMessage(actor, recipient, undefined, text || undefined, (files && files.length > 0) ? files[0] : null, object.id); await createMessage(actor, recipient, undefined, text || undefined, (files && files.length > 0) ? files[0] : null, object.id);
return null;
} }
return null;
} else { } else {
return await post(actor, { return await post(actor, {
createdAt: note.published ? new Date(note.published) : null, createdAt: note.published ? new Date(note.published) : null,