Fix error on notification reply on iOS (#9181)

* Fix error on notification reply on iOS

* Revert unneeded change

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Daniel Espino García 2025-10-03 12:43:46 +02:00 committed by GitHub
parent dcf2a3c6e1
commit 1f9fc9bda7
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"];
}