mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-11 20:04:32 +02:00
feat(message_decoder): memories story share
This commit is contained in:
parent
7adbec9ab7
commit
3c0e1b7a23
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user