Fix timestamps on some messages loaded from the recent-messages service on startup (#2020)

This commit is contained in:
Daniel
2020-10-03 07:37:07 -04:00
committed by GitHub
parent b67e20d962
commit 58a6983796
7 changed files with 52 additions and 52 deletions
+2 -18
View File
@@ -220,24 +220,8 @@ MessagePtr TwitchMessageBuilder::build()
}
// timestamp
if (this->historicalMessage_)
{
// This may be architecture dependent(datatype)
bool customReceived = false;
qint64 ts =
this->tags.value("rm-received-ts").toLongLong(&customReceived);
if (!customReceived)
{
ts = this->tags.value("tmi-sent-ts").toLongLong();
}
QDateTime dateTime = QDateTime::fromMSecsSinceEpoch(ts);
this->emplace<TimestampElement>(dateTime.time());
}
else
{
this->emplace<TimestampElement>();
}
this->emplace<TimestampElement>(
calculateMessageTimestamp(this->ircMessage));
bool addModerationElement = true;
if (this->senderIsBroadcaster)