Add support for the "history" node on MUC join
Supports the "seconds", "maxstanzas", "since" and "maxchars" (but only =0) attributes. fix #3270
This commit is contained in:
@@ -784,7 +784,7 @@ void IrcClient::on_channel_completely_joined(const IrcMessage& message)
|
||||
channel->joined = true;
|
||||
this->bridge.send_user_join(this->hostname, chan_name, channel->get_self(),
|
||||
channel->get_self()->get_most_significant_mode(this->sorted_user_modes), true);
|
||||
this->bridge.send_room_history(this->hostname, chan_name);
|
||||
this->bridge.send_room_history(this->hostname, chan_name, this->history_limit);
|
||||
this->bridge.send_topic(this->hostname, chan_name, channel->topic, channel->topic_author);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <irc/irc_channel.hpp>
|
||||
#include <irc/iid.hpp>
|
||||
|
||||
#include <bridge/history_limit.hpp>
|
||||
|
||||
#include <network/tcp_client_socket_handler.hpp>
|
||||
#include <network/resolver.hpp>
|
||||
|
||||
@@ -296,6 +298,11 @@ public:
|
||||
const std::vector<char>& get_sorted_user_modes() const { return this->sorted_user_modes; }
|
||||
|
||||
std::set<char> get_chantypes() const { return this->chantypes; }
|
||||
|
||||
/**
|
||||
* Store the history limit that the client asked when joining this room.
|
||||
*/
|
||||
HistoryLimit history_limit;
|
||||
private:
|
||||
/**
|
||||
* The hostname of the server we are connected to.
|
||||
|
||||
Reference in New Issue
Block a user