From 58fd68916636df2372f8187b375245ef5922833a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 30 Jan 2018 09:14:26 +0100 Subject: Add a ifndef USE_DATABASE guard around send_history_message --- src/xmpp/xmpp_component.cpp | 3 ++- src/xmpp/xmpp_component.hpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 88baf6e..9be9e34 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -4,7 +4,6 @@ #include #include -#include #include #include #include @@ -399,6 +398,7 @@ void XmppComponent::send_muc_message(const std::string& muc_name, const std::str this->send_stanza(message); } +#ifdef USE_DATABASE void XmppComponent::send_history_message(const std::string& muc_name, const std::string& nick, const std::string& body_txt, const std::string& jid_to, Database::time_point::rep timestamp) { Stanza message("message"); @@ -422,6 +422,7 @@ void XmppComponent::send_history_message(const std::string& muc_name, const std: this->send_stanza(message); } +#endif void XmppComponent::send_muc_leave(const std::string& muc_name, const std::string& nick, Xmpp::body&& message, const std::string& jid_to, const bool self, const bool user_requested) diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index 3950863..cef26c1 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -1,8 +1,10 @@ #pragma once +#include "biboumi.h" #include #include +#include #include #include @@ -133,11 +135,13 @@ public: */ void send_muc_message(const std::string& muc_name, const std::string& nick, Xmpp::body&& body, const std::string& jid_to, std::string uuid); +#ifdef USE_DATABASE /** * Send a message, with a element, part of a MUC history */ void send_history_message(const std::string& muc_name, const std::string& nick, const std::string& body, const std::string& jid_to, const std::time_t timestamp); +#endif /** * Send an unavailable presence for this nick */ -- cgit v1.2.3