Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b62576
commit 337d3f8
Showing
3 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2023 Signal Messenger, LLC | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
import * as log from '../logging/log'; | ||
|
||
export function isPnpCapable(): boolean { | ||
const me = window.ConversationController.getOurConversation(); | ||
if (!me) { | ||
log.warn('isPnpCapable: missing our conversation'); | ||
return false; | ||
} | ||
|
||
// These capabilities are filled by a periodic background check for our | ||
// account. | ||
const capabilities = me.get('capabilities'); | ||
if (!capabilities) { | ||
log.warn('isPnpCapable: no cached capabilities'); | ||
return false; | ||
} | ||
|
||
// `capabilities.pni` becomes true once all linked devices and the primary | ||
// advertise this capability. | ||
return capabilities.pni === true; | ||
} |
This file was deleted.
Oops, something went wrong.