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

Add support for Siri Shortcuts #4856

Closed

Conversation

StefanLobbenmeier
Copy link

@StefanLobbenmeier StefanLobbenmeier commented Jan 31, 2021

First time contributor checklist

Contributor checklist

  • I'm following the code, UI and style conventions
  • My commits are rebased on the latest master branch
  • My commits are in nice logical chunks
  • My contribution is fully baked and is ready to be merged as is
  • I have tested my contribution on these devices:
  • iPad Simulator (8th Generation), iOS 14.4

Description

Closes (or at least starts with closing) feature requests like

A screenshot of what a potential shortcut might look like:
image

Current shortcomings:

  • In this version this will open Signal and write the Message. I have not quite figured out how to write the Message in the Background (like it is possible with iMessage).
  • It is not possible to select the phone number directly. I was able to select a contact instead, but could not find a way to directly set the phone number from a contact in the Shortcut like it is possible with iMessage and WhatsApp.
  • I have not developed for iOS before
  • No Check for Empty values / Error handling

I wanted to share this state with you though to get some feedback if this is actually something that would be merged and if I used the correct APIs in the Signal codebase

@StefanLobbenmeier
Copy link
Author

StefanLobbenmeier commented Jan 31, 2021

I'm following the code, UI and style conventions

The link is bad, there is no headline "code-conventions", so the link https://github.com/WhisperSystems/Signal-iOS/blob/master/CONTRIBUTING.md#code-conventions is probably wrong

@deeps-lab
Copy link

Also it would be better if Signal allows Siri to
Read & Send messages

@StefanLobbenmeier
Copy link
Author

It looks like Signal is now donating suggestions to Siri, but not in a way that messages can be customised.

Would still be very nice to get some feedback on this by someone on Signal.

@bzumik1
Copy link

bzumik1 commented Jan 22, 2022

How does it look with this feature?

@StefanLobbenmeier
Copy link
Author

No idea, I haven’t received any kind of feedback so far. Maybe I have to ping someone from the Signal team?

@Imperiopolis-Signal

@stale
Copy link

stale bot commented Mar 23, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Mar 23, 2022
@bzumik1
Copy link

bzumik1 commented Mar 23, 2022

I am still waiting for better shortcuts support.

@stale stale bot removed the wontfix label Mar 23, 2022
@lockieluke
Copy link

Please merge I need this feature so badly why are they so slow at merging prs can we just fork it and make a Signal Community version

@adhulipa
Copy link

adhulipa commented Jul 20, 2022

This is a great PR! I'm curious, @StefanLobbenmeier, why did you choose to create a new "SendMessage.intentsdefinition" file instead of supporting a handler for the INSendMessageIntent directly?

Ref: https://developer.apple.com/documentation/sirikit/dispatching_intents_to_handlers

For example, to handle an INSendMessageIntent, provide an instance of a type that conforms to the INSendMessageIntentHandling protocol

For example, here's how Telegram seems to support it: https://github.com/peter-iakovlev/Telegram/tree/public/SiriIntents
This will allow you to leverage the full Siri Messaging functionality (and all future updates thereof) with Signal as if it were a native messaging app on iOS

@StefanLobbenmeier
Copy link
Author

@adhulipa honestly because I am not an iOS developer and was not aware of that INSendMessageIntent unlocks a Siri Shortcut.

I was also wondering how you can make a shortcut that supports selecting an account directly. But I first wanted to get the signal team to look at this before I spend more effort investigating on how this might be implemented. But so far I have been ghosted 😢

Feel free to open another PR where you improve upon my approach, I hope that they somehow react to yours then.

@StefanLobbenmeier
Copy link
Author

Telegram also has some Intents like I did here: https://github.com/TelegramMessenger/Telegram-iOS/blob/master/Telegram/SiriIntents/en.lproj/Intents.intentdefinition

But I have not used Telegram before so I am not quite sure what they are

@StefanLobbenmeier
Copy link
Author

Ok i just installed telegram and it looks like those Siri intents are unrelated to shortcuts. In the shortcuts app only one intention is available:

it says „Send Message“, „Send Message to recipient“, „Show while running“:
A1C42DC7-7BE9-4EF4-B502-D45B7D424A7D

@StefanLobbenmeier
Copy link
Author

I found this commit claiming to add Siri Shortcut support, but I think it only enabled donating intents like we have in signal, that open the messaging app so you can type, no parameters.

I think support for parameterized use in Siri Shortcuts was enabled sometime in 2021: TelegramMessenger/Telegram-iOS#190 (comment)

@StefanLobbenmeier
Copy link
Author

StefanLobbenmeier commented Jul 20, 2022

I read up some more and I dont see how telegram has declared the Shortcut Support. The references to INSendMessageIntent in plist files are the same as the ones in Signal plist files.

But I found this commit in another messenger, that looks more like my approach.

@adhulipa
Copy link

Thanks for the notes @StefanLobbenmeier! Super interesting! -- I am speculating that it's likely the Signal team hasn't looked at this because of the pending merge-conflicts? Do you know how to fix them?

Also, I would recommend checking the "My PR is fully baked... " checkbox and taking a second look at the description box and making sure it's all updated and tidy. Generally, in these types of open source projects I have found that the maintainers are super busy and tend to not respond when something doesn't look ready.

Of course, I'm not a Signal developer :D -- I'm just sharing my experiences from working on open sources contributions from many years ago :D

@StefanLobbenmeier
Copy link
Author

StefanLobbenmeier commented Aug 16, 2022

Yeah I was mostly looking for feedback before I spend any more time on this. Like I said I am not an iOS developer, I mostly do Java and Kotlin in the Backend at work, so it would be better if someone with real experience in iOS and app development would take a look. But feel free to cherry pick my commits and try a new PR, for me it will be some time until I have more time to look into this.

@ShadowRoi
Copy link

@harry-signal Hey please can we get some more info about this? We need some feedback

@stale
Copy link

stale bot commented Feb 5, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 5, 2023
@stale
Copy link

stale bot commented Feb 12, 2023

This issue has been closed due to inactivity.

@stale stale bot closed this Feb 12, 2023
@InnovationBuddy
Copy link

Similar to
#5030

@eizedev
Copy link

eizedev commented May 13, 2024

This issue has been closed due to inactivity.

signal developers doesn’t answer or comment issues/pull requests, in this case, for years but the stale bot github action is set to 1 week.
I still need this functionality :(

@ITaluone
Copy link

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

9 participants