aboutsummaryrefslogtreecommitdiff
path: root/lib/keyverificationsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/keyverificationsession.cpp')
-rw-r--r--lib/keyverificationsession.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/keyverificationsession.cpp b/lib/keyverificationsession.cpp
index 3b3b7627..d889b465 100644
--- a/lib/keyverificationsession.cpp
+++ b/lib/keyverificationsession.cpp
@@ -23,8 +23,10 @@ KeyVerificationSession::KeyVerificationSession(const QString& remoteUserId, cons
, m_encrypted(encrypted)
, m_remoteSupportedMethods(event.methods())
{
- auto timeoutTime = std::min<long int>(event.timestamp() + 600000, QDateTime::currentDateTime().addSecs(120).toMSecsSinceEpoch());
- m_timeout = timeoutTime - QDateTime::currentMSecsSinceEpoch();
+ auto timeoutTime = std::min(event.timestamp().addSecs(600),
+ QDateTime::currentDateTime().addSecs(120));
+ m_timeout =
+ timeoutTime.toMSecsSinceEpoch() - QDateTime::currentMSecsSinceEpoch();
if (m_timeout <= 5000) {
return;
}