refactor: make a single MessageBuilder (#5548)

This commit is contained in:
pajlada
2024-08-24 12:18:27 +02:00
committed by GitHub
parent 5170085d7c
commit 175afa8b16
33 changed files with 2819 additions and 3014 deletions
@@ -5,9 +5,9 @@
#include "controllers/notifications/NotificationModel.hpp"
#include "controllers/sound/ISoundController.hpp"
#include "messages/Message.hpp"
#include "messages/MessageBuilder.hpp"
#include "providers/twitch/api/Helix.hpp"
#include "providers/twitch/TwitchIrcServer.hpp"
#include "providers/twitch/TwitchMessageBuilder.hpp"
#include "singletons/Settings.hpp"
#include "singletons/StreamerMode.hpp"
#include "singletons/Toasts.hpp"
@@ -137,11 +137,9 @@ void NotificationController::notifyTwitchChannelLive(
}
// Message in /live channel
MessageBuilder builder;
TwitchMessageBuilder::liveMessage(payload.displayName, &builder);
builder.message().id = payload.channelId;
getApp()->getTwitch()->getLiveChannel()->addMessage(
builder.release(), MessageContext::Original);
MessageBuilder::makeLiveMessage(payload.displayName, payload.channelId),
MessageContext::Original);
// Notify on all channels with a ping sound
if (showNotification && !playedSound &&