Refactor recent messages API (#4763)
This exposes internal functions for testing by splitting the implementation & internal API into separate files
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "providers/bttv/BttvEmotes.hpp"
|
||||
#include "providers/bttv/BttvLiveUpdates.hpp"
|
||||
#include "providers/bttv/liveupdates/BttvLiveUpdateMessages.hpp"
|
||||
#include "providers/RecentMessagesApi.hpp"
|
||||
#include "providers/recentmessages/Api.hpp"
|
||||
#include "providers/seventv/eventapi/Dispatch.hpp"
|
||||
#include "providers/seventv/SeventvAPI.hpp"
|
||||
#include "providers/seventv/SeventvEmotes.hpp"
|
||||
@@ -1108,7 +1108,7 @@ void TwitchChannel::loadRecentMessages()
|
||||
}
|
||||
|
||||
auto weak = weakOf<Channel>(this);
|
||||
RecentMessagesApi::loadRecentMessages(
|
||||
recentmessages::load(
|
||||
this->getName(), weak,
|
||||
[weak](const auto &messages) {
|
||||
auto shared = weak.lock();
|
||||
@@ -1163,7 +1163,7 @@ void TwitchChannel::loadRecentMessagesReconnect()
|
||||
}
|
||||
|
||||
auto weak = weakOf<Channel>(this);
|
||||
RecentMessagesApi::loadRecentMessages(
|
||||
recentmessages::load(
|
||||
this->getName(), weak,
|
||||
[weak](const auto &messages) {
|
||||
auto shared = weak.lock();
|
||||
|
||||
Reference in New Issue
Block a user