aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-26 14:11:37 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-26 14:11:37 +0900
commita78ae0e75225629563ce253308e9b88383b0ea4d (patch)
treeae58727d104b8e0866e18519250f22e00fe75335
parent17c7afaa4339e7e2259718f19a80ffbf960b1a8d (diff)
downloadlibquotient-a78ae0e75225629563ce253308e9b88383b0ea4d.tar.gz
libquotient-a78ae0e75225629563ce253308e9b88383b0ea4d.zip
Room::avatarObject
Closes #268.
-rw-r--r--lib/room.cpp5
-rw-r--r--lib/room.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 8395baca..5da9373e 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -404,6 +404,11 @@ QUrl Room::avatarUrl() const
return d->avatar.url();
}
+const Avatar& Room::avatarObject() const
+{
+ return d->avatar;
+}
+
QImage Room::avatar(int dimension)
{
return avatar(dimension, dimension);
diff --git a/lib/room.h b/lib/room.h
index a9341bd2..f4ecef42 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -33,6 +33,7 @@
namespace QMatrixClient
{
class Event;
+ class Avatar;
class SyncRoomData;
class RoomMemberEvent;
class Connection;
@@ -158,6 +159,7 @@ namespace QMatrixClient
QString topic() const;
QString avatarMediaId() const;
QUrl avatarUrl() const;
+ const Avatar& avatarObject() const;
Q_INVOKABLE JoinState joinState() const;
Q_INVOKABLE QList<User*> usersTyping() const;
QList<User*> membersLeft() const;