deltachat-ios icon indicating copy to clipboard operation
deltachat-ios copied to clipboard

sharing to a one-to-one siri-shortcut faulty

Open paulaluap opened this issue 1 year ago • 6 comments

to reproduce:

  • share a webpage from safari
  • select a one-to-one siri-shortcut
  • subsequent dialog shows "saved messages" instead of the selected one-to-one chat

same with sharing an image from the gallery and probably other apps.

sharing to a group works.

  • Device: iphone x
  • iOS version: 16
  • Delta Chat version: 1.32

paulaluap avatar Sep 29 '22 15:09 paulaluap

in contrast to https://github.com/deltachat/deltachat-ios/issues/1678, this is a very reproducible thing, thanks a lot for figuring that out!

r10s avatar Sep 29 '22 16:09 r10s

I can only reproduce that bug in a multi-account scenario if the selected account is not the one the one-on-one chat belongs to. Is that the case for you as well @paulaluap ? My proposal to fix this bug would be to show only the siri shortcut contacts for the active account.

with the upcoming sharing refinment we could also implement automatic account switching. Important will be to indicate somewhere from which account the shared message would be sent, because that could be ambiguous if you have the receipients contact name in multiple accounts.

cyBerta avatar Oct 01 '22 11:10 cyBerta

I can only reproduce that bug in a multi-account scenario if the selected account is not the one the one-on-one chat belongs to. Is that the case for you as well @paulaluap ?

thanks for taking care. no, i am not using a multi-account.

paulaluap avatar Oct 01 '22 13:10 paulaluap

stepping back from this ticket for a bit, to focus on #1709, which I can reproduce

cyBerta avatar Oct 04 '22 15:10 cyBerta

i found the failing line:

https://github.com/deltachat/deltachat-ios/blob/bf38b19e329c59cbadff66ad2e2cfc5cb97ddd4a/DcShare/Controller/ShareViewController.swift#L103

here, if let intent = self.extensionContext?.intent as? INSendMessageIntent fails - ~~maybe the intent is of another class?~~ EDIT: after splitting the expression, it turns out, extensionContext.intent is nil.

EDIT: i am also failing to reproduce that on a new installation - maybe this comes from a bug in the past where donateSendMessageIntent() was erroneous?

cmp. https://stackoverflow.com/questions/70258121/ios-sharecontext-tapping-on-suggestion-intent-property-of-extensioncontext-is-ni

@cyBerta any idea why extensionContext.intent can be nil?

r10s avatar Oct 07 '22 15:10 r10s

i am also failing to reproduce "new chats" with the issue. also, when donating a previously failing contact again, things are fine. maybe this is some hickup from the ios15 -> ios16 upgrade?

r10s avatar Oct 07 '22 15:10 r10s