From d1626c929f1d313c2f0f85b7d8b756a8d488d1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 22 Aug 2016 00:44:17 +0200 Subject: When joining a channel, send the most recent history found in the database --- louloulibs/xmpp/xmpp_component.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 5fc6d2e..3a3b10b 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -134,6 +134,11 @@ public: * Send a (non-private) message to the MUC */ void send_muc_message(const std::string& muc_name, const std::string& nick, Xmpp::body&& body, const std::string& jid_to); + /** + * 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); /** * Send an unavailable presence for this nick */ -- cgit v1.2.3 From 5e59cc517ff2c653d796bae01550e5d74b384fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 22 Aug 2016 20:25:41 +0200 Subject: Add missing ctime include --- louloulibs/xmpp/xmpp_component.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 3a3b10b..ba097e5 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #define STREAM_NS "http://etherx.jabber.org/streams" -- cgit v1.2.3 From 7536a1b3f38fbf093c1629b0db209754ada0c906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 25 Aug 2016 19:43:51 +0200 Subject: Respond to MAM requests on a channel JID At the moment, result-set-management is not implemented, the whole history (well, at most 1024 messages) is returned. --- louloulibs/xmpp/xmpp_component.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index ba097e5..8359d05 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -26,6 +26,10 @@ #define VERSION_NS "jabber:iq:version" #define ADHOC_NS "http://jabber.org/protocol/commands" #define PING_NS "urn:xmpp:ping" +#define DELAY_NS "urn:xmpp:delay" +#define MAM_NS "urn:xmpp:mam:1" +#define FORWARD_NS "urn:xmpp:forward:0" +#define CLIENT_NS "jabber:client" /** * An XMPP component, communicating with an XMPP server using the protocole -- cgit v1.2.3 From 3047bd41b212390da8e3a4dbcf351e79879042dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 4 Sep 2016 21:04:21 +0200 Subject: MAM results can be filtered by start and end dates --- louloulibs/xmpp/xmpp_component.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 8359d05..b556ce2 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -30,6 +30,7 @@ #define MAM_NS "urn:xmpp:mam:1" #define FORWARD_NS "urn:xmpp:forward:0" #define CLIENT_NS "jabber:client" +#define DATAFORM_NS "jabber:x:data" /** * An XMPP component, communicating with an XMPP server using the protocole -- cgit v1.2.3 From 76a8189b46177eb78eee12d1cb3266f282acd380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 3 Oct 2016 00:58:21 +0200 Subject: Implement result-set-management for LIST queries ref #2948 --- louloulibs/xmpp/xmpp_component.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index b556ce2..4b6f37d 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -31,6 +31,7 @@ #define FORWARD_NS "urn:xmpp:forward:0" #define CLIENT_NS "jabber:client" #define DATAFORM_NS "jabber:x:data" +#define RSM_NS "http://jabber.org/protocol/rsm" /** * An XMPP component, communicating with an XMPP server using the protocole @@ -219,6 +220,9 @@ public: virtual void after_handshake() {} + const std::string& get_served_hostname() const + { return this->served_hostname; } + /** * Whether or not we ever succeeded our authentication to the XMPP server */ -- cgit v1.2.3 From 1d197ff26ce5a88ba851969edb3ea915759c3477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 4 Oct 2016 19:32:45 +0200 Subject: Respond to muc#traffic requests fix #3069 --- louloulibs/xmpp/xmpp_component.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 4b6f37d..1cb1845 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -32,6 +32,7 @@ #define CLIENT_NS "jabber:client" #define DATAFORM_NS "jabber:x:data" #define RSM_NS "http://jabber.org/protocol/rsm" +#define MUC_TRAFFIC_NS "http://jabber.org/protocol/muc#traffic" /** * An XMPP component, communicating with an XMPP server using the protocole -- cgit v1.2.3 From 8ac8d2b2425d19eb995a36efa808b664979e358f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 7 Oct 2016 23:28:40 +0200 Subject: Correctly set status="110" in the presence for the target of a kick --- louloulibs/xmpp/xmpp_component.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 1cb1845..232d47a 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -164,11 +164,8 @@ public: /** * An user is kicked from a room */ - void kick_user(const std::string& muc_name, - const std::string& target, - const std::string& reason, - const std::string& author, - const std::string& jid_to); + void kick_user(const std::string& muc_name, const std::string& target, const std::string& reason, + const std::string& author, const std::string& jid_to, const bool self); /** * Send a generic presence error */ -- cgit v1.2.3 From dfc0793ef2fec12d2613b53b27f1a7f85dae2688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 11 Oct 2016 00:43:46 +0200 Subject: Include a private and no-copy nodes in private to avoid carbon duplication --- louloulibs/xmpp/xmpp_component.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 232d47a..45a4038 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -109,9 +109,8 @@ public: * If fulljid is false, the provided 'from' doesn't contain the * server-part of the JID and must be added. */ - void send_message(const std::string& from, Xmpp::body&& body, - const std::string& to, const std::string& type, - const bool fulljid=false); + void send_message(const std::string& from, Xmpp::body&& body, const std::string& to, + const std::string& type, const bool fulljid, const bool nocopy=false); /** * Send a join from a new participant */ -- cgit v1.2.3 From b5beb043325ca5625f4eb53cb9451daf499c586b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 7 Nov 2016 21:57:39 +0100 Subject: Remove a never reached (and non-sensical) error --- louloulibs/xmpp/xmpp_component.hpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'louloulibs/xmpp/xmpp_component.hpp') diff --git a/louloulibs/xmpp/xmpp_component.hpp b/louloulibs/xmpp/xmpp_component.hpp index 45a4038..5f5f937 100644 --- a/louloulibs/xmpp/xmpp_component.hpp +++ b/louloulibs/xmpp/xmpp_component.hpp @@ -127,12 +127,6 @@ public: void send_invalid_room_error(const std::string& muc_jid, const std::string& nick, const std::string& to); - /** - * Send an error to indicate that the user tried to send a message to an - * invalid user. - */ - void send_invalid_user_error(const std::string& user_name, - const std::string& to); /** * Send the MUC topic to the user */ -- cgit v1.2.3