Ensure that untrusted conversations are always rendered in dialog
This commit is contained in:
parent
08360d150c
commit
feb5e569f3
|
@ -1293,6 +1293,9 @@ function verifyConversationsStoppingSend(): ThunkAction<
|
|||
conversationIdsStoppingSend.forEach(async conversationId => {
|
||||
const conversation = window.ConversationController.get(conversationId);
|
||||
if (!conversation) {
|
||||
log.warn(
|
||||
`verifyConversationsStoppingSend: Cannot verify missing conversation for conversationId ${conversationId}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1027,20 +1027,15 @@ export const getConversationIdsStoppingSend = createSelector(
|
|||
);
|
||||
|
||||
export const getConversationsStoppingSend = createSelector(
|
||||
getConversationByIdSelector,
|
||||
getConversationSelector,
|
||||
getConversationIdsStoppingSend,
|
||||
(
|
||||
conversationSelector: (id: string) => undefined | ConversationType,
|
||||
conversationSelector: GetConversationByIdType,
|
||||
conversationIds: ReadonlyArray<string>
|
||||
): Array<ConversationType> => {
|
||||
const conversations = conversationIds
|
||||
.map(conversationId => conversationSelector(conversationId))
|
||||
.filter(isNotNil);
|
||||
if (conversationIds.length !== conversations.length) {
|
||||
log.warn(
|
||||
`getConversationsStoppingSend: Started with ${conversationIds.length} items, ended up with ${conversations.length}.`
|
||||
const conversations = conversationIds.map(conversationId =>
|
||||
conversationSelector(conversationId)
|
||||
);
|
||||
}
|
||||
return sortByTitle(conversations);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue