Feat: limitSharing (advanced conversation privacy) (#1899)
* Update messages.ts * Update Message.ts * lint * lint
This commit is contained in:
@@ -276,6 +276,9 @@ export type AnyMessageContent =
|
||||
| {
|
||||
disappearingMessagesInChat: boolean | number
|
||||
}
|
||||
| {
|
||||
limitSharing: boolean
|
||||
}
|
||||
|
||||
export type GroupMetadataParticipants = Pick<GroupMetadata, 'participants'>
|
||||
|
||||
|
||||
@@ -566,6 +566,16 @@ export const generateWAMessageContent = async (
|
||||
}
|
||||
} else if ('requestPhoneNumber' in message) {
|
||||
m.requestPhoneNumberMessage = {}
|
||||
} else if ('limitSharing' in message) {
|
||||
m.protocolMessage = {
|
||||
type: proto.Message.ProtocolMessage.Type.LIMIT_SHARING,
|
||||
limitSharing: {
|
||||
sharingLimited: message.limitSharing === true,
|
||||
trigger: 1,
|
||||
limitSharingSettingTimestamp: Date.now(),
|
||||
initiatedByMe: true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m = await prepareWAMessageMedia(message, options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user