Spam Reporting UI changes
This commit is contained in:
parent
e031d136a1
commit
8387f938eb
88 changed files with 2711 additions and 807 deletions
17
ts/util/getAddedByForOurPendingInvitation.ts
Normal file
17
ts/util/getAddedByForOurPendingInvitation.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
|
||||
export function getAddedByForOurPendingInvitation(
|
||||
conversation: ConversationType
|
||||
): ConversationType | null {
|
||||
const ourAci = window.storage.user.getCheckedAci();
|
||||
const ourPni = window.storage.user.getPni();
|
||||
const addedBy = conversation.pendingMemberships?.find(
|
||||
item => item.serviceId === ourAci || item.serviceId === ourPni
|
||||
)?.addedByUserId;
|
||||
if (addedBy == null) {
|
||||
return null;
|
||||
}
|
||||
return window.ConversationController.get(addedBy)?.format() ?? null;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue