Files
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

30 lines
1.1 KiB
Swift

import Foundation
func postboxUpgrade_13to14(metadataTable: MetadataTable, valueBox: ValueBox, progress: (Float) -> Void) {
var peerSettings: [PeerId: Data] = [:]
let peerNotificationSettingsTable = ValueBoxTable(id: 19, keyType: .int64, compactValuesOnCreation: false)
valueBox.scanInt64(peerNotificationSettingsTable, values: { key, value in
let peerId = PeerId(key)
peerSettings[peerId] = value.makeData()
return true
})
valueBox.removeAllFromTable(peerNotificationSettingsTable)
let key = ValueBoxKey(length: 8)
let buffer = WriteBuffer()
for (peerId, settings) in peerSettings {
buffer.reset()
key.setInt64(0, value: peerId.toInt64())
var flagsValue: Int32 = (1 << 0)
buffer.write(&flagsValue, offset: 0, length: 4)
var length: Int32 = Int32(settings.count)
buffer.write(&length, offset: 0, length: 4)
buffer.write(settings)
valueBox.set(peerNotificationSettingsTable, key: key, value: buffer)
}
metadataTable.setUserVersion(14)
}