From a441a4ae1223e745c41ad7b9a111ad4401125d16 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 5 Nov 2020 23:28:54 +0300 Subject: Implement Context.getConfig() --- context.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'context.cpp') diff --git a/context.cpp b/context.cpp index ad5c2c9..1e44f7e 100644 --- a/context.cpp +++ b/context.cpp @@ -85,6 +85,16 @@ Context::getBlobdir() return result; } +QString +Context::getConfig(QString key) +{ + QByteArray utf8Key = key.toUtf8(); + char *value = dc_get_config(m_context, utf8Key.constData()); + QString result{value}; + dc_str_unref(value); + return result; +} + QString Context::getMessageInfo(uint32_t msgId) { -- cgit v1.2.3-70-g09d2