<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Le 25/02/2020 à 19:09, Kevin Harwell a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAM-yhnkQSk4RJj0cuouWn-s5S-1tfgVOAncn5+sKysyttM+R8Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr"><snip></div>
</blockquote>
<br>
<blockquote type="cite"
cite="mid:CAM-yhnkQSk4RJj0cuouWn-s5S-1tfgVOAncn5+sKysyttM+R8Q@mail.gmail.com">
<div dir="ltr">I could never get (2). When trying to send
variables in the TextMessageReceived event I would get a
validation error unless they are formatted like (3).
<div><br>
</div>
<div>(3) is the currently declared documented way to to it. As
such any other way breaks the API definition. However, when
executing a sendMessage (1) is the way it is currently
working, so I'd be worried about breaking current
implementations if we altered it to (3) for that case.</div>
<div><br>
</div>
<div>So what to do?</div>
<div><br>
</div>
<div>Option A: Leave sendMessage as is (1), update the
documentation for it, and fix TextMessageReceived to send
variables as defined like (3). Least breaking, but
inconsistent way of sending and receiving variables. </div>
<div><br>
</div>
<div>Option B: Update sendMessage to pass a TextMessageVariable
like (3), and fix TextMessageReceived to send variables like
(3). The current API definition doesn't change, but may break
implementations.</div>
<div><br>
</div>
<div>Option C: Leave sendMessage as is (1), update the
TextMessageVariable API definition to be similar to (1), e.g {
"var name": "var value" }, and not { "key": "var name",
"value": "var value" }. This of course breaks the current API
definition, and would break implementations if the validation
error did not occur.<br>
</div>
<div><br>
</div>
<div>While "A" is the safest (least breaking?), personally, I
prefer and choose "C". While it does break the API it
seemingly has not worked since the start so I don't think this
will break any current implementations. It will also make
sending and receiving variables more consistent.</div>
<div><br>
</div>
<div>Thoughts?</div>
</div>
</blockquote>
I agree with option "C".<br>
<blockquote type="cite"
cite="mid:CAM-yhnkQSk4RJj0cuouWn-s5S-1tfgVOAncn5+sKysyttM+R8Q@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">Kevin Harwell
<div>Software Developer</div>
<div>Sangoma Technologies<br>
<div>Check us out at: <a href="https://sangoma.com/"
target="_blank" moz-do-not-send="true">https://sangoma.com</a> &
<a href="https://asterisk.org" target="_blank"
moz-do-not-send="true">https://asterisk.org</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</blockquote>
</body>
</html>