aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-07-25 13:12:52 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-07-25 16:10:25 +0200
commitaac349a2b3fe643b55808586f461642ea15da8e5 (patch)
tree4554a52e331709c8fe43aa8fd68d985dfe7caf5c /lib/room.cpp
parent4770d303b7141971fa9a25f85874e6bbe71776d9 (diff)
downloadlibquotient-aac349a2b3fe643b55808586f461642ea15da8e5.tar.gz
libquotient-aac349a2b3fe643b55808586f461642ea15da8e5.zip
Don't redact certain event types even though lib doesn't know them
Event type ids don't need a C++ type to be used, and clients might define those types on their side (NeoChat does that, e.g.).
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index b128d2a7..53474c24 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -2640,10 +2640,11 @@ RoomEventPtr makeRedacted(const RoomEvent& target,
{ QStringLiteral("ban"), QStringLiteral("events"),
QStringLiteral("events_default"), QStringLiteral("kick"),
QStringLiteral("redact"), QStringLiteral("state_default"),
- QStringLiteral("users"), QStringLiteral("users_default") } }
- // , { RoomJoinRules::typeId(), { QStringLiteral("join_rule") } }
- // , { RoomHistoryVisibility::typeId(),
- // { QStringLiteral("history_visibility") } }
+ QStringLiteral("users"), QStringLiteral("users_default") } },
+ // TODO: Replace with RoomJoinRules::TypeId etc. once available
+ { "m.room.join_rules"_ls, { QStringLiteral("join_rule") } },
+ { "m.room.history_visibility"_ls,
+ { QStringLiteral("history_visibility") } }
};
for (auto it = originalJson.begin(); it != originalJson.end();) {
if (!keepKeys.contains(it.key()))