$message variable should be array?

Created on 30 January 2017, almost 8 years ago
Updated 10 December 2024, about 1 month ago

I just created new module using smsframework. then i found the $message variable (sms_send()) is full text/string, hard to use.

My sms services company provide different type sms services, one is verification code which not allow full text but only template variable.
i should pass parameters and template id to sms server, the sms server do rest job.

if $message variable is an array, should be good. like this :

  $message = array(
    // template, text, other type?  text meaning no need to process message.
    'type' => "template", 
    'text' => "Your verification code is 1234.", // full text, optional for template type.
    'code' => "1234", // verification code
    'templateid' => "tpl_981234567",
    'template' => "Your verification code is !code",
    'otherkey' => "whatever", // no limit 
  );

if i write new module handle every step, the $message variable can controlled by myself. but i need other module pass the $message variable.
if there are any variables like 'verification code' inside $message text, it should separate as key => value inside $message., so user can handle it flexibly.

Feature request
Status

Closed: outdated

Version

1.0

Component

Core Framework

Created by

🇨🇳China dzy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024