Problem/Motivation

Part of #2396201: [meta] Update 8.x-1.x branch to match core 8.0.1, SMS Actions has not yet been ported to Drupal 8.

Proposed resolution

Port SMS Actions to Drupal 8

Remaining tasks

Patch
Reviews
Commit

User interface changes

None

API changes

None

Data model changes

All the settings schema needed to port the module.

CommentFileSizeAuthor
#5 port_sms_actions-2641888-5.patch33.37 KBalmaudoh

Comments

almaudoh created an issue. See original summary.

almaudoh’s picture

Assigned: Unassigned » almaudoh

Working on this now...

dpi’s picture

I think it might be worth converting existing core actions to Rules actions.

The Drupal action system is not great, and is not good enough for Rules (#2501929: Separate the Rules actions API from core). Action plugins never got a formal context system like conditions received.

dpi’s picture

Status: Active » Postponed

I think this should be postponed until Rules matures, or at least receives a full UI.

almaudoh’s picture

StatusFileSize
new33.37 KB

I've had this done for a while waiting for the Rules module to get to Milestone 2. Just uploading to show progress...

dpi’s picture

Issue tags: +beta blocker

This submodule should be updated or removed before beta.

Since this module is a nontrivial endeavor, do you anticipate being api-stable by ~July?

almaudoh’s picture

Considering that SMS Actions is a misnomer for what the module actually does. I'm going to re-purpose this issue to provide mobile-originated SMS receipt and parsing, which will later on be integrated with Rules after #2712599: [meta] Rules integration is in.

This issue is going to be primarily about implementing keyword based D8 Conditions, hence the module will also be renamed to SMS Conditions [subject to bike-shedding :)]

Re-rolled patch above https://github.com/almaudoh/smsframework/pull/7/files

Edit: updated PR link

almaudoh’s picture

Status: Postponed » Active
dpi’s picture

From #2709925: Remove sms_incoming() and sms_incoming.inc #8

This is what SMS Actions module is primarily doing - it allows old Drupal 6 / 7 triggers to be defined based on the keywords in a received SMS and then these triggers can be linked to actions.

dpi’s picture

re: #9

Are you saying that sms_actions is what I was doing with sms_user incoming messages (placeholders etc) ?

Sorry I don't think I actually looked into sms_actions properly then...

almaudoh’s picture

Are you saying that sms_actions is what I was doing with sms_user incoming messages (placeholders etc) ?

Can't remember what you were doing there...maybe post a link to a PR or commit??

dpi’s picture

It sounds like the placeholder system I implemented for \Drupal\sms_user\AccountRegistration.

/admin/config/smsframework/sms_user_options -> Pre-formatted message.

AccountRegistration::preFormattedMessage

dpi’s picture

I was thinking about making that placeholder system a registry for the core module, then when an incoming message with that pattern is found it is routed to the correct callback .

almaudoh’s picture

It sounds like the placeholder system I implemented for \Drupal\sms_user\AccountRegistration

Yeah. It's the same kind of thing, but yours looks more flexible and capable.
The SMS Actions one was just in the format of:

{discriminant} *rest of text*

Then an action will be triggered if discriminant matches a specified value and the whole text content will be sent as context to the triggered action.

almaudoh’s picture

I was thinking about making that placeholder system a registry for the core module, then when an incoming message with that pattern is found it is routed to the correct callback

We can design and develop an entire system for handling incoming messages based on a pre-defined format. The Conditions system is a good way to go.

I actually implemented a custom module for a site that had the same functionality (and more stuff) long before I saw it in SMS Actions. So this is an indication that a generic implementation would be widely useful.

almaudoh’s picture

Issue tags: -beta blocker

We can do this in 1.1 I think.

dpi’s picture

Issue tags: +release-8.x-1.1
dpi’s picture

almaudoh’s picture

I suggest this be done in a separate module entirely outside of SMS Framework.

dpi’s picture