aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-09 18:19:53 +0300
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-09 18:34:34 +0300
commit608e252bae9cf8cf763e05363bfacf5e1760134f (patch)
treeda92218aa3f44e0216ace4a7046c10fe0f9f3e63 /lib
parent1b38ad0ce7ca8b2a5a7e4936824697b84e6b7076 (diff)
downloadlibquotient-608e252bae9cf8cf763e05363bfacf5e1760134f.tar.gz
libquotient-608e252bae9cf8cf763e05363bfacf5e1760134f.zip
RoomEvent::timestamp() -> originTimestamp()
The previous name is still available but deprecated.
Diffstat (limited to 'lib')
-rw-r--r--lib/events/roomevent.cpp2
-rw-r--r--lib/events/roomevent.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index 4a9a8b5d..a59cd6e0 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -44,7 +44,7 @@ RoomEvent::~RoomEvent() = default; // Let the smart pointer do its job
QString RoomEvent::id() const { return fullJson()[EventIdKeyL].toString(); }
-QDateTime RoomEvent::timestamp() const
+QDateTime RoomEvent::originTimestamp() const
{
return Quotient::fromJson<QDateTime>(fullJson()["origin_server_ts"_ls]);
}
diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h
index f943bce4..621652cb 100644
--- a/lib/events/roomevent.h
+++ b/lib/events/roomevent.h
@@ -46,7 +46,10 @@ public:
~RoomEvent() override;
QString id() const;
- QDateTime timestamp() const;
+ QDateTime originTimestamp() const;
+ [[deprecated("Use originTimestamp()")]] QDateTime timestamp() const {
+ return originTimestamp();
+ }
QString roomId() const;
QString senderId() const;
bool isReplaced() const;