Skip to content

Commit

Permalink
Merge pull request #1297 from nextcloud/fix-intent-crash
Browse files Browse the repository at this point in the history
Potentially fix intent crash
  • Loading branch information
Ivansss authored Jul 10, 2023
2 parents 0427da6 + 06e2659 commit 6126255
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 6126255

Please sign in to comment.