Send an error presence when the connection to the IRC server fails
This commit is contained in:
@@ -241,6 +241,11 @@ void Bridge::send_message(const Iid& iid, const std::string& nick, const std::st
|
||||
this->make_xmpp_body(body), this->user_jid, "chat");
|
||||
}
|
||||
|
||||
void Bridge::send_join_failed(const Iid& iid, const std::string& nick, const std::string& type, const std::string& condition, const std::string& text)
|
||||
{
|
||||
this->xmpp->send_presence_error(iid.chan + "%" + iid.server, nick, this->user_jid, type, condition, text);
|
||||
}
|
||||
|
||||
void Bridge::send_muc_leave(Iid&& iid, std::string&& nick, const std::string& message, const bool self)
|
||||
{
|
||||
this->xmpp->send_muc_leave(std::move(iid.chan) + "%" + std::move(iid.server), std::move(nick), this->make_xmpp_body(message), this->user_jid, self);
|
||||
|
||||
@@ -80,6 +80,11 @@ public:
|
||||
* Send a MUC message from some participant
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
void send_join_failed(const Iid& iid, const std::string& nick, const std::string& type, const std::string& condition, const std::string& text);
|
||||
/**
|
||||
* Send an unavailable presence from this participant
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user