From 021d00d9d9148be3c5969ac7834403c695f9258d Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: 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. --- context.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'context.cpp') 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); } -- cgit v1.2.3-70-g09d2