Closed vincentneo closed 1 year ago
It is used internally by TDLib when processPushNotification
. You will not be able to decrypt it yourself.
According to #1599, processPushNotification
isn't working for iOS, right? Or were there any recent changes for this?
If you can launch TDLib when a push notification is received, then you can use processPushNotification
as in all other operating systems. Otherwise, you can't use attachb64
.
I see. Will try that soon, thank you!
Nope not working, am getting error 400, "Receive empty loc_key", which suggests #1599 is still valid.
sample of a payload that I submitted:
{
"from_id":"<redacted id>",
"aps":{
"thread-id":"<redacted id>",
"mutable-content":1,
"alert":{"title":"<redacted name>","body":"Test"},
"category":"r",
"sound":"0.m4a"},
"msg_id":"<redacted id>"
}
If loc_key
is manually provided by me, it will get error 400, "Can't find dialog_id"
Yes, processPushNotification
isn't able to process iOS push notifications, because they are sent in a very specific format without a lot of data.
So there's basically no way at all when dealing with iOS push notifications to display a preview of the image in the notification?
Yes. Full MTProto implementation and support of the server-side API is required to decrypt and parse the field attachb64
.
That’s unfortunate.
time to give up my adventure on this feature then…
When Telegram's Apple push notifications is received, if the message has an image attachment, there's a field with key of
attachb64
.How is this supposed to be decoded? I assume base64 because 'b64', but it doesn't decode to anything meaningful.