aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-17 19:50:34 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-17 19:50:34 +0900
commitc94ad527ed94a4c1ca368dc8c8c59e490b907649 (patch)
tree1970aa0f0e162dd84b4902c78816e132a2ebbe15
parent3478e691df49b9c0938220db57b03a9c6fcbec8d (diff)
downloadlibquotient-c94ad527ed94a4c1ca368dc8c8c59e490b907649.tar.gz
libquotient-c94ad527ed94a4c1ca368dc8c8c59e490b907649.zip
User::isIgnored()
-rw-r--r--lib/user.cpp5
-rw-r--r--lib/user.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index bfd23ae2..eec41957 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -312,6 +312,11 @@ void User::unmarkIgnore()
connection()->removeFromIgnoredUsers(this);
}
+bool User::isIgnored() const
+{
+ return connection()->isIgnored(this);
+}
+
void User::Private::setAvatarOnServer(QString contentUri, User* q)
{
auto* j = connection->callApi<SetAvatarUrlJob>(userId, contentUri);
diff --git a/lib/user.h b/lib/user.h
index 17f5625f..0023b44a 100644
--- a/lib/user.h
+++ b/lib/user.h
@@ -125,6 +125,8 @@ namespace QMatrixClient
void ignore();
/** Remove the user from the ignore list */
void unmarkIgnore();
+ /** Check whether the user is in ignore list */
+ bool isIgnored() const;
signals:
void nameAboutToChange(QString newName, QString oldName,