A few serviceId fixes
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
1f963efd64
commit
deb1f9bd8d
3 changed files with 14 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
import { chunk } from 'lodash';
|
||||
import type { LoggerType } from '../../types/Logging';
|
||||
import { normalizeAci } from '../../types/ServiceId';
|
||||
import { getSendOptions } from '../../util/getSendOptions';
|
||||
import type { SendTypesType } from '../../util/handleMessageSend';
|
||||
import { handleMessageSend } from '../../util/handleMessageSend';
|
||||
|
@ -147,9 +148,18 @@ export async function runSyncJob({
|
|||
}
|
||||
}
|
||||
|
||||
const aciSyncs = syncs.map(({ senderUuid, ...rest }) => {
|
||||
return {
|
||||
...rest,
|
||||
senderAci: senderUuid
|
||||
? normalizeAci(senderUuid, 'syncHelpers.senderUuid')
|
||||
: undefined,
|
||||
};
|
||||
});
|
||||
|
||||
try {
|
||||
await Promise.all(
|
||||
chunk(syncs, CHUNK_SIZE).map(batch => {
|
||||
chunk(aciSyncs, CHUNK_SIZE).map(batch => {
|
||||
const messageIds = batch.map(item => item.messageId).filter(isNotNil);
|
||||
|
||||
return handleMessageSend(doSync(batch, sendOptions), {
|
||||
|
|
|
@ -1947,8 +1947,9 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
strictAssert(id, 'Quote must have an id');
|
||||
|
||||
const result: QuotedMessageType = {
|
||||
...quote,
|
||||
...omit(quote, 'authorAci'),
|
||||
|
||||
authorUuid: quote.authorAci,
|
||||
id,
|
||||
|
||||
attachments: quote.attachments.slice(),
|
||||
|
|
|
@ -1455,7 +1455,7 @@ export default class MessageSender {
|
|||
|
||||
async syncReadMessages(
|
||||
reads: ReadonlyArray<{
|
||||
senderUuid?: string;
|
||||
senderAci?: AciString;
|
||||
senderE164?: string;
|
||||
timestamp: number;
|
||||
}>,
|
||||
|
|
Loading…
Reference in a new issue