aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context.cpp9
-rw-r--r--context.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index ef657c6..5bb0f44 100644
--- a/context.cpp
+++ b/context.cpp
@@ -85,6 +85,15 @@ Context::getBlobdir()
return result;
}
+QString
+Context::getMessageInfo(uint32_t msgId)
+{
+ char *info = dc_get_msg_info(m_context, msgId);
+ QString result{info};
+ dc_str_unref(info);
+ return result;
+}
+
uint32_t
Context::sendTextMessage(uint32_t chatId, QString textToSend)
{
diff --git a/context.h b/context.h
index c9bb8a5..91cc315 100644
--- a/context.h
+++ b/context.h
@@ -29,6 +29,7 @@ public:
Q_INVOKABLE DcContact *getContact(uint32_t contactId);
Q_INVOKABLE uint32_t sendTextMessage(uint32_t chatId, QString textToSend);
QString getBlobdir();
+ Q_INVOKABLE QString getMessageInfo(uint32_t msgId);
private:
dc_context_t *m_context{nullptr};