Add history visibiltiy room setting

Add setting for setting the history visibility.

Note this setting can only be read not set for Quotient version < 0.7 as there is no event definition for a history visibility state event and it doesn't seem worth creating one when not needed with Quotient 0.7.

BUG: 457840
This commit is contained in:
James Graham
2022-11-25 16:13:01 +00:00
parent 23548ef151
commit 054ad80d30
3 changed files with 86 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ class NeoChatRoom : public Quotient::Room
Q_PROPERTY(QDateTime lastActiveTime READ lastActiveTime NOTIFY lastActiveTimeChanged)
Q_PROPERTY(bool isInvite READ isInvite NOTIFY isInviteChanged)
Q_PROPERTY(QString joinRule READ joinRule WRITE setJoinRule NOTIFY joinRuleChanged)
Q_PROPERTY(QString historyVisibility READ historyVisibility WRITE setHistoryVisibility NOTIFY historyVisibilityChanged)
Q_PROPERTY(QString htmlSafeDisplayName READ htmlSafeDisplayName NOTIFY displayNameChanged)
Q_PROPERTY(PushNotificationState::State pushNotificationState MEMBER m_currentPushNotificationState WRITE setPushNotificationState NOTIFY
pushNotificationStateChanged)
@@ -112,6 +113,9 @@ public:
[[nodiscard]] QString joinRule() const;
void setJoinRule(const QString &joinRule);
[[nodiscard]] QString historyVisibility() const;
void setHistoryVisibility(const QString &historyVisibilityRule);
[[nodiscard]] bool hasFileUploading() const
{
return m_hasFileUploading;
@@ -258,6 +262,7 @@ Q_SIGNALS:
void chatBoxAttachmentPathChanged();
void canEncryptRoomChanged();
void joinRuleChanged();
void historyVisibilityChanged();
public Q_SLOTS:
void uploadFile(const QUrl &url, const QString &body = QString());