From 80856b853b49b53322425a90ae801bca760cf740 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 7 Aug 2021 21:36:51 +0000 Subject: Use `dc_send_msg` to send messages `dc_send_text_msg` is too limited as it can only send text without attachments. --- context.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'context.cpp') diff --git a/context.cpp b/context.cpp index 4c9163d..7c0bcc3 100644 --- a/context.cpp +++ b/context.cpp @@ -250,6 +250,12 @@ Context::newMessage(int viewtype) return new DcMessage{message}; } +uint32_t +Context::sendMessage(uint32_t chatId, DcMessage *message) +{ + return dc_send_msg(m_context, chatId, message->m_message); +} + void Context::importBackup(QString tarfile) { -- cgit v1.2.3-70-g09d2