diff options
author | Scott Murray <scott.murray@konsulko.com> | 2019-12-29 16:33:34 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2019-12-29 16:33:34 -0500 |
commit | 726407129b7679a16a97c2ca0ac7cb865980a4bc (patch) | |
tree | dc0f6e0213b1ab67fbaec9efeeffb69455585a4e /signal-composer-binding/signal-composer-binding.cpp | |
parent | 7cca8039aec47b1958dc329959fb3a9a0d4ed2ae (diff) |
Add session uuid to subscribe replieshalibut_8.0.6halibut_8.0.5halibut/8.0.6halibut/8.0.58.0.68.0.5halibut
Add the session uuid to event subscribe replies to match the documented
behavior and enable clients like libappcontroller based bindings and
applications to be able to use it in their event handling.
Bug-AGL: SPEC-3074
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I185165e600410190b30b1d8bd5a6ad8675b2b714
Diffstat (limited to 'signal-composer-binding/signal-composer-binding.cpp')
-rw-r--r-- | signal-composer-binding/signal-composer-binding.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp index fb97c71..b28d8ec 100644 --- a/signal-composer-binding/signal-composer-binding.cpp +++ b/signal-composer-binding/signal-composer-binding.cpp @@ -102,9 +102,17 @@ static void do_subscribe_unsubscribe(afb_req_t request, bool subscribe, clientAp } if(rc >= 0) - afb_req_success(request, NULL, NULL); + { + json_object *reply = json_object_new_object(); + json_object_object_add(reply, + "uuid", + json_object_new_string(cContext->getUUID().c_str())); + afb_req_reply(request, reply, NULL, NULL); + } else + { afb_req_fail(request, "error", NULL); + } } /// @brief entry point for client un-subscription request. |