From a3ee944ceb20bde940699fdeb7cb7f5a18e5a44f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sat, 18 Jan 2014 10:54:11 +0100
Subject: Sluift: Fix send_message
Change-Id: I96b35a905553f5b25272179eaaf6c1b12ba2cd41
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index cdbc591..1a64eea 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -170,6 +170,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
Client, send_message,
"Send a message.",
"self\n"
+ "to the JID to send the message to\n"
"body the body of the message. Can alternatively be specified using the `body` option\n",
"to the JID to send the message to\n"
"body the body of the message\n"
@@ -183,8 +184,8 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
if (lua_isstring(L, index)) {
to = std::string(lua_tostring(L, index));
++index;
- if (!lua_isstring(L, index)) {
- std::string body = lua_tostring(L, index);
+ if (lua_isstring(L, index)) {
+ body = lua_tostring(L, index);
++index;
}
}
--
cgit v0.10.2-6-g49f6