feat(message_decoder): memories story share

This commit is contained in:
rhunk 2024-05-09 16:06:43 +02:00
parent 7adbec9ab7
commit 3c0e1b7a23

View File

@ -138,6 +138,19 @@ object MessageDecoder {
} }
} }
fun ProtoReader.decodeShares() {
// saved story
followPath(24, 2) {
decodeSnapDocMedia(AttachmentType.EXTERNAL_MEDIA, this)
}
// memories story
followPath(11) {
eachBuffer(3) {
decodeSnapDocMedia(AttachmentType.EXTERNAL_MEDIA, this)
}
}
}
// media keys // media keys
protoReader.eachBuffer(4, 5) { protoReader.eachBuffer(4, 5) {
getByteArray(1, 3)?.also { mediaKey -> getByteArray(1, 3)?.also { mediaKey ->
@ -157,8 +170,8 @@ object MessageDecoder {
followPath(4) { decodeSticker(this) } followPath(4) { decodeSticker(this) }
// shares // shares
followPath(5, 24, 2) { followPath(5) {
decodeSnapDocMedia(AttachmentType.EXTERNAL_MEDIA, this) decodeShares()
} }
// audio notes // audio notes
@ -189,8 +202,16 @@ object MessageDecoder {
// attached sticker // attached sticker
followPath(13) { decodeSticker(this) } followPath(13) { decodeSticker(this) }
// reply shares
followPath(14) { decodeShares() }
// attached audio note // attached audio note
followPath(15) { decodeSnapDocMediaPlayback(AttachmentType.NOTE, this) } followPath(15) { decodeSnapDocMediaPlayback(AttachmentType.NOTE, this) }
// reply snap
followPath(17) {
decodeSnapDocMedia(AttachmentType.SNAP, this)
}
} }
// snaps // snaps