Fix handling of replies on multiple dist lists
This commit is contained in:
parent
3c7502213b
commit
1941a33556
4 changed files with 284 additions and 70 deletions
|
@ -38,7 +38,7 @@ import {
|
|||
SignedPreKeys,
|
||||
} from '../LibSignalStores';
|
||||
import { verifySignature } from '../Curve';
|
||||
import { strictAssert } from '../util/assert';
|
||||
import { strictAssert, assertDev } from '../util/assert';
|
||||
import type { BatcherType } from '../util/batcher';
|
||||
import { createBatcher } from '../util/batcher';
|
||||
import { drop } from '../util/drop';
|
||||
|
@ -2213,12 +2213,20 @@ export default class MessageReceiver
|
|||
'handleStoryMessage.destinationUuid'
|
||||
);
|
||||
|
||||
recipient.distributionListIds?.forEach(listId => {
|
||||
const sentUuids: Set<string> =
|
||||
distributionListToSentUuid.get(listId) || new Set();
|
||||
sentUuids.add(normalizedDestinationUuid);
|
||||
distributionListToSentUuid.set(listId, sentUuids);
|
||||
});
|
||||
if (recipient.distributionListIds) {
|
||||
recipient.distributionListIds.forEach(listId => {
|
||||
const sentUuids: Set<string> =
|
||||
distributionListToSentUuid.get(listId) || new Set();
|
||||
sentUuids.add(normalizedDestinationUuid);
|
||||
distributionListToSentUuid.set(listId, sentUuids);
|
||||
});
|
||||
} else {
|
||||
assertDev(
|
||||
false,
|
||||
`MessageReceiver.handleStoryMessage(${logId}): missing ` +
|
||||
`distribution list id for: ${destinationUuid}`
|
||||
);
|
||||
}
|
||||
|
||||
isAllowedToReply.set(
|
||||
normalizedDestinationUuid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue