The source project of this merge request has been removed.
Decode message classes stored as token-text
As per OMA-TS-MMS_ENC-V1_3-20110913-A § 7.3.27, the X-Mms-Message-Class field may be encoded as a byte or as a string. Previously, decoding an MMS message with its class encoded as a string would fail and the MMS message would fail to be downloaded.
This MR adds code to convert message classes encoded as strings to bytes (which is how nuntium stores them) so that the MMS messages are properly decoded. The string -> byte mappings are from Appendix D. If the message class is some other string, a warning is logged and the class is set to "Personal". This ensures the message is still readable.
This was a //TODO
.
Fixes some instances of MMS messages failing to download.
Testing: sudo ubports-qa install focal_-_PR_nuntium_28
Tested on:
- Xiaomi Poco X3 NFC (focal, dev)
Thanks!
Edited by j1xlte-gtelwifiue