Feat: limitSharing (advanced conversation privacy) (#1899)

* Update messages.ts

* Update Message.ts

* lint

* lint
This commit is contained in:
Bob
2025-10-11 07:46:03 -03:00
committed by GitHub
parent 20c43d1d3c
commit f9abf44994
2 changed files with 13 additions and 0 deletions
+3
View File
@@ -276,6 +276,9 @@ export type AnyMessageContent =
| {
disappearingMessagesInChat: boolean | number
}
| {
limitSharing: boolean
}
export type GroupMetadataParticipants = Pick<GroupMetadata, 'participants'>
+10
View File
@@ -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)
}