summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp8
-rw-r--r--src/bridge/bridge.hpp5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 9501d47..ba4911a 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -331,9 +331,11 @@ void Bridge::send_message(const Iid& iid, const std::string& nick, const std::st
}
}
-void Bridge::send_join_failed(const Iid& iid, const std::string& nick, const std::string& type, const std::string& condition, const std::string& text)
+void Bridge::send_presence_error(const Iid& iid, const std::string& nick,
+ const std::string& type, const std::string& condition,
+ const std::string& error_code, const std::string& text)
{
- this->xmpp->send_presence_error(std::to_string(iid), nick, this->user_jid, type, condition, text);
+ this->xmpp->send_presence_error(std::to_string(iid), nick, this->user_jid, type, condition, error_code, text);
}
void Bridge::send_muc_leave(Iid&& iid, std::string&& nick, const std::string& message, const bool self)
@@ -412,7 +414,7 @@ void Bridge::kick_muc_user(Iid&& iid, const std::string& target, const std::stri
void Bridge::send_nickname_conflict_error(const Iid& iid, const std::string& nickname)
{
- this->xmpp->send_nickname_conflict_error(std::to_string(iid), nickname, this->user_jid);
+ this->xmpp->send_presence_error(std::to_string(iid), nickname, this->user_jid, "cancel", "conflict", "409", "");
}
void Bridge::send_affiliation_role_change(const Iid& iid, const std::string& target, const char mode)
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index a75b319..b0e6a27 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -100,10 +100,9 @@ public:
*/
void send_message(const Iid& iid, const std::string& nick, const std::string& body, const bool muc);
/**
- * Send a presence of type error, from a room. This is used to indicate
- * why joining a room failed.
+ * Send a presence of type error, from a room.
*/
- void send_join_failed(const Iid& iid, const std::string& nick, const std::string& type, const std::string& condition, const std::string& text);
+ void send_presence_error(const Iid& iid, const std::string& nick, const std::string& type, const std::string& condition, const std::string& error_code, const std::string& text);
/**
* Send an unavailable presence from this participant
*/