Closed tomhut closed 3 years ago
Hi!
withAttributes
is synchronous, it just remembers completion callback in TCHMessageOptions
object and returns immediately.
This completion callback would be called later, on message sending, when this TCHMessageOptions
object is passed to [TCHMessages sendMessageWithOptions]
.
By the way, sendMessageWithOptions
method also has its own completion callback, it will be called on send completion.
So TCHMessageOptions
completion callback would be called right before actual sending started,
and sendMessageWithOptions
completion callback is called after message is sent.
Sorry that documentation is not clear.
We have plans to fix this behaviour, but this time we decided not to make breaking release to make it work more logical. For now we are closing this issue, but keep an eye on updates.
@Pavel-Cherentsov @Gray-Wind Thank you both!
Hi,
Since updating to the latest version of the framework it seems the callback closure is never called when adding attributes to TCHMessageOptions. Although this is not critical to our app, we do use these to attach the aspect ratio of an image so a correct sized placeholder can be shown in the message list whilst the image is downloaded.
Any help would be greatly appreciated, in version 1.2.0 the callback is fired successfully.