summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/client.cpp2
-rw-r--r--Sluift/component.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index 997fd00..8f6ff3a 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -487,7 +487,7 @@ static void pushEvent(lua_State* L, const SluiftClient::Event& event) {
Lua::Table result = boost::assign::map_list_of
("type", boost::make_shared<Lua::Value>(std::string("message")))
("from", boost::make_shared<Lua::Value>(message->getFrom().toString()))
- ("body", boost::make_shared<Lua::Value>(message->getBody()))
+ ("body", boost::make_shared<Lua::Value>(message->getBody().get_value_or("")))
("message_type", boost::make_shared<Lua::Value>(MessageConvertor::convertMessageTypeToString(message->getType())));
Lua::pushValue(L, result);
addPayloadsToTable(L, message->getPayloads());
diff --git a/Sluift/component.cpp b/Sluift/component.cpp
index e92352e..a9ac2d9 100644
--- a/Sluift/component.cpp
+++ b/Sluift/component.cpp
@@ -362,7 +362,7 @@ static void pushEvent(lua_State* L, const SluiftComponent::Event& event) {
("type", boost::make_shared<Lua::Value>(std::string("message")))
("from", boost::make_shared<Lua::Value>(message->getFrom().toString()))
("to", boost::make_shared<Lua::Value>(message->getTo().toString()))
- ("body", boost::make_shared<Lua::Value>(message->getBody()))
+ ("body", boost::make_shared<Lua::Value>(message->getBody().get_value_or("")))
("message_type", boost::make_shared<Lua::Value>(MessageConvertor::convertMessageTypeToString(message->getType())));
Lua::pushValue(L, result);
addPayloadsToTable(L, message->getPayloads());