Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentially fix intent crash #1297

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion NextcloudTalk/NCIntentController.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ - (void)donateSendMessageIntentForRoom:(NCRoom *)room
image = [[AvatarManager shared] createRenderedImageWithImage:image];
}

[sendMessageIntent setImage:[INImage imageWithUIImage:image] forParameterNamed:@"speakableGroupName"];
INImage *intentImage = [INImage imageWithUIImage:image];
[sendMessageIntent setImage:intentImage forParameterNamed:@"speakableGroupName"];
[self donateMessageSentIntent:sendMessageIntent];
}
}];
Expand Down
4 changes: 2 additions & 2 deletions ShareExtension/ShareConfirmationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@ - (void)sendSharedText
{
[[NCAPIController sharedInstance] sendChatMessage:self.shareTextView.text toRoom:_room.token displayName:nil replyTo:-1 referenceId:nil silently:NO forAccount:_account withCompletionBlock:^(NSError *error) {
if (error) {
[self.delegate shareConfirmationViewControllerDidFailed:self];
NSLog(@"Failed to send shared item");
[self.delegate shareConfirmationViewControllerDidFailed:self];
} else {
[self.delegate shareConfirmationViewControllerDidFinish:self];
[[NCIntentController sharedInstance] donateSendMessageIntentForRoom:self->_room];
[self.delegate shareConfirmationViewControllerDidFinish:self];
}
[self stopAnimatingSharingIndicator];
}];
Expand Down