Sender Key: Prepare for production
This commit is contained in:
parent
f226822dff
commit
bff3f0c74a
14 changed files with 334 additions and 183 deletions
|
@ -16,6 +16,7 @@ import {
|
|||
padMessage,
|
||||
SenderCertificateMode,
|
||||
} from '../textsecure/OutgoingMessage';
|
||||
import { isEnabled } from '../RemoteConfig';
|
||||
|
||||
import { isOlderThan } from './timestamp';
|
||||
import {
|
||||
|
@ -116,6 +117,7 @@ export async function sendContentMessageToGroup({
|
|||
const ourConversation = window.ConversationController.get(ourConversationId);
|
||||
|
||||
if (
|
||||
isEnabled('desktop.sendSenderKey') &&
|
||||
ourConversation?.get('capabilities')?.senderKey &&
|
||||
isGroupV2(conversation.attributes)
|
||||
) {
|
||||
|
@ -199,8 +201,9 @@ export async function sendToGroupViaSenderKey(options: {
|
|||
}
|
||||
|
||||
if (
|
||||
contentHint !== ContentHint.DEFAULT &&
|
||||
contentHint !== ContentHint.RESENDABLE &&
|
||||
contentHint !== ContentHint.SUPPLEMENTARY
|
||||
contentHint !== ContentHint.IMPLICIT
|
||||
) {
|
||||
throw new Error(
|
||||
`sendToGroupViaSenderKey/${logId}: Invalid contentHint ${contentHint}`
|
||||
|
@ -326,7 +329,7 @@ export async function sendToGroupViaSenderKey(options: {
|
|||
);
|
||||
await window.textsecure.messaging.sendSenderKeyDistributionMessage(
|
||||
{
|
||||
contentHint: ContentHint.SUPPLEMENTARY,
|
||||
contentHint: ContentHint.DEFAULT,
|
||||
distributionId,
|
||||
groupId,
|
||||
identifiers: newToMemberUuids,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue