diff options
-rw-r--r-- | lib/user.cpp | 5 | ||||
-rw-r--r-- | lib/user.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/user.cpp b/lib/user.cpp index 9f0386f4..c4c4fec8 100644 --- a/lib/user.cpp +++ b/lib/user.cpp @@ -154,6 +154,11 @@ bool User::setAvatar(QIODevice* source) return doSetAvatar(source); } +void User::removeAvatar() +{ + connection()->callApi<SetAvatarUrlJob>(id(), ""); +} + void User::requestDirectChat() { connection()->requestDirectChat(this); } void User::ignore() { connection()->addToIgnoredUsers(this); } @@ -117,6 +117,8 @@ public Q_SLOTS: bool setAvatar(const QString& fileName); /// Upload contents of the QIODevice and set that as an avatar bool setAvatar(QIODevice* source); + /// Removes the avatar from the profile + void removeAvatar(); /// Create or find a direct chat with this user /*! The resulting chat is returned asynchronously via * Connection::directChatAvailable() |