aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
authorArnav Rawat <rawat.arnav@gmail.com>2021-02-22 13:42:42 -0600
committerArnav Rawat <rawat.arnav@gmail.com>2021-02-22 13:42:42 -0600
commit1f92a5a957f7de38ef7c2bf425b8d6ac7fa1239c (patch)
tree35d23d15119703d6cdb04b040e7fc1ef0c6efa18 /lib/user.cpp
parent48d2ecc4df4d1883326036e55949156cfb37acc6 (diff)
downloadlibquotient-1f92a5a957f7de38ef7c2bf425b8d6ac7fa1239c.tar.gz
libquotient-1f92a5a957f7de38ef7c2bf425b8d6ac7fa1239c.zip
Adds ability remove the avatar
Not possible previously
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp5
1 files changed, 5 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); }