Fix error on notification reply on iOS (#9181) (#9185)

* Fix error on notification reply on iOS

* Revert unneeded change

* Apply suggestion from @Copilot



---------


(cherry picked from commit 1f9fc9bda7)

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Mattermost Build 2025-10-03 13:53:46 +03:00 committed by GitHub
parent 9c0e60660c
commit 33dcdc0cb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,7 @@ static SendReplyCompletionHandlerIMP originalSendReplyCompletionHandlerImplement
[request setValue:@"application/json; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
// Add preauth secret header if available
if (preauthSecret != nil && ![preauthSecret isEqualToString:@""]) {
if ([preauthSecret isKindOfClass:NSString.class] && [(NSString *)preauthSecret length] > 0) {
[request setValue:preauthSecret forHTTPHeaderField:@"X-Mattermost-Preauth-Secret"];
}