diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-23 08:34:53 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-23 18:37:08 +0200 |
commit | 143ac38aabab90b40fbe73b489b91fb159e66b6b (patch) | |
tree | 4781d895b1b5c0fe42dc50a104fa7b752db7489e /lib/events | |
parent | 19746de7426aeb67eb90e8c48448356691e270b0 (diff) | |
download | libquotient-143ac38aabab90b40fbe73b489b91fb159e66b6b.tar.gz libquotient-143ac38aabab90b40fbe73b489b91fb159e66b6b.zip |
Streamline Room::P::shouldRotateMegolmSession()
Now there's only 1 instead of 5 lookups of the same EncryptionEvent,
and the code is shorter.
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/encryptionevent.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/events/encryptionevent.h b/lib/events/encryptionevent.h index c73e5598..945b17e7 100644 --- a/lib/events/encryptionevent.h +++ b/lib/events/encryptionevent.h @@ -52,6 +52,8 @@ public: QString algorithm() const { return content().algorithm; } int rotationPeriodMs() const { return content().rotationPeriodMs; } int rotationPeriodMsgs() const { return content().rotationPeriodMsgs; } + + bool useEncryption() const { return !algorithm().isEmpty(); } }; REGISTER_EVENT_TYPE(EncryptionEvent) } // namespace Quotient |