This commit is contained in:
Green Sky 2024-10-25 13:52:24 +02:00
parent a9fbf54693
commit c112d19f8d
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -204,7 +204,7 @@ SDBot::SDBot(
Contact3Registry& cr,
RegistryMessageModelI& rmm,
ConfigModelI& conf
) : _cr(cr), _rmm(rmm), _conf(conf) {
) : _cr(cr), _rmm(rmm), _rmm_sr(_rmm.newSubRef(this)), _conf(conf) {
_rng.seed(std::random_device{}());
_rng.discard(3137);
@ -252,7 +252,7 @@ SDBot::SDBot(
_conf.set("SDBot", "cfg_scale", 6.5);
}
_rmm.subscribe(this, RegistryMessageModel_Event::message_construct);
_rmm_sr.subscribe(RegistryMessageModel_Event::message_construct);
}
SDBot::~SDBot(void) {

View File

@ -21,6 +21,7 @@ struct ConfigModelI;
class SDBot : public RegistryMessageModelEventI {
Contact3Registry& _cr;
RegistryMessageModelI& _rmm;
RegistryMessageModelI::SubscriptionReference _rmm_sr;
ConfigModelI& _conf;
//TransferManager& _tm;