summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/client.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index 24ece85..814ad45 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -301,2 +301,3 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
"to the JID to send the message to\n"
+ "id the id to set on the stanza\n"
"body the body of the message\n"
@@ -309,2 +310,3 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
boost::optional<std::string> body;
+ boost::optional<std::string> id;
boost::optional<std::string> subject;
@@ -326,2 +328,6 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
+ if (boost::optional<std::string> value = Lua::getStringField(L, index, "id")) {
+ id = value;
+ }
+
if (boost::optional<std::string> value = Lua::getStringField(L, index, "body")) {
@@ -352,2 +358,5 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
}
+ if (id) {
+ message->setID(*id);
+ }
if (subject) {
@@ -371,3 +380,4 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
- "to the JID to send the message to\n"
+ "to the JID to send the presence to\n"
+ "id the id to set on the stanza\n"
"status the text of the presence\n"
@@ -390,2 +400,5 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
}
+ if (boost::optional<std::string> id = Lua::getStringField(L, index, "id")) {
+ presence->setID(*id);
+ }
if (boost::optional<std::string> value = Lua::getStringField(L, index, "status")) {