aboutsummaryrefslogtreecommitdiff
path: root/context.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>1970-01-01 00:00:00 +0000
committerlink2xt <link2xt@testrun.org>1970-01-01 00:00:00 +0000
commit021d00d9d9148be3c5969ac7834403c695f9258d (patch)
tree7f3da0eeeb9b7f56b333af0fca5dd2a4795322b9 /context.cpp
parentd4c66cd1341084b37dfabe3126d13ff8f062fd59 (diff)
downloadkdeltachat-021d00d9d9148be3c5969ac7834403c695f9258d.tar.gz
kdeltachat-021d00d9d9148be3c5969ac7834403c695f9258d.zip
Add Message.setFile method
This allows setting file from JavaScript, so C++ remains a thin wrapper to Delta Chat core API. sendMessage only calls dc_send_msg, and all the attachment logic goes to the JavaScript code.
Diffstat (limited to 'context.cpp')
-rw-r--r--context.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/context.cpp b/context.cpp
index 1fa24af..802a555 100644
--- a/context.cpp
+++ b/context.cpp
@@ -267,12 +267,8 @@ Context::newMessage(int viewtype)
}
uint32_t
-Context::sendMessage(uint32_t chatId, DcMessage *message, QString attachment)
+Context::sendMessage(uint32_t chatId, DcMessage *message)
{
- if (!attachment.isEmpty()) {
- QByteArray utf8attachFilename = attachment.toUtf8();
- dc_msg_set_file(message->m_message, utf8attachFilename.constData(), NULL);
- }
return dc_send_msg(m_context, chatId, message->m_message);
}