From 59c69952e5a14de5e6a4e9d567aaaf0ce7685d86 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Jun 2025 15:18:35 +0300 Subject: Telegram protocol not to use db_event_edit to update reactions, because it exports a message each time --- include/m_database.h | 1 + include/m_db_int.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index 52b4621107..e0a22b207b 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -401,6 +401,7 @@ EXTERN_C MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char // Sets a value to the JSON field in the blob MIR_CORE_DLL(int) db_event_setJson(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv); +MIR_CORE_DLL(int) db_event_setJson(MEVENT hDbEvent, const char *pBlob); // Updates the server ID associated with an event // Returns 0 on success or a failure otherwise diff --git a/include/m_db_int.h b/include/m_db_int.h index 0304cc263c..f9aa88a479 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -132,7 +132,9 @@ interface MIR_APP_EXPORT MIDatabase STDMETHOD_(MEVENT, FindLastEvent)(MCONTACT contactID) PURE; STDMETHOD_(MEVENT, FindNextEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE; STDMETHOD_(MEVENT, FindPrevEvent)(MCONTACT contactID, MEVENT hDbEvent) PURE; + STDMETHOD_(int, SetEventJson)(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv) PURE; + STDMETHOD_(int, SetEventJson)(MEVENT hDbEvent, const char *pBlob) PURE; STDMETHOD_(BOOL, DeleteModule)(MCONTACT contactID, LPCSTR szModule) PURE; STDMETHOD_(BOOL, EnumModuleNames)(DBMODULEENUMPROC pFunc, void *pParam) PURE; @@ -226,6 +228,7 @@ public: STDMETHODIMP_(BOOL) WriteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv) override; STDMETHODIMP_(int) SetEventJson(MEVENT hDbEvent, const char *szSetting, DBVARIANT *dbv) override; + STDMETHODIMP_(int) SetEventJson(MEVENT hDbEvent, const char *pBlob) override; STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam) override; STDMETHODIMP_(BOOL) SetSettingResident(BOOL bIsResident, const char *pszSettingName) override; -- cgit v1.2.3