aboutsummaryrefslogtreecommitdiff
path: root/context.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-05-22 15:23:11 +0300
committerlink2xt <link2xt@testrun.org>2021-05-22 15:23:11 +0300
commit166d17e61da080ee7b83317b1a97ec2046960706 (patch)
treee97b48d2f604927116f8490a991efc972c08a41e /context.cpp
parentace0d420686be26ea88cca64406a7b6cf5e10260 (diff)
downloadkdeltachat-166d17e61da080ee7b83317b1a97ec2046960706.tar.gz
kdeltachat-166d17e61da080ee7b83317b1a97ec2046960706.zip
Implement libdeltachat API for HTML view
HTML API: - Context::getMessageHtml() - DcMessage::getSubject() - DcMessage::hasHtml() Also implemented: - DcMessage::getFilemime() - DcMessage::getShowPadlock() - DcMessage::getError()
Diffstat (limited to 'context.cpp')
-rw-r--r--context.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index 89a7937..e7742f6 100644
--- a/context.cpp
+++ b/context.cpp
@@ -173,6 +173,15 @@ Context::getMessageInfo(uint32_t msgId)
return result;
}
+QString
+Context::getMessageHtml(uint32_t msgId)
+{
+ char *html = dc_get_msg_html(m_context, msgId);
+ QString result{html};
+ dc_str_unref(html);
+ return result;
+}
+
uint32_t
Context::sendTextMessage(uint32_t chatId, QString textToSend)
{