summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-10-13 17:19:54 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-10-13 17:55:07 +0200
commit37009906bb3521db3ae77a0bb39a6943b7ccdec0 (patch)
tree612c6360194266ebb83f96016ff37e6626d57ad6 /src/timeline/TimelineModel.cpp
parentBump mtxclient (diff)
downloadnheko-37009906bb3521db3ae77a0bb39a6943b7ccdec0.tar.xz
Evaluate push rules locally
Diffstat (limited to '')
-rw-r--r--src/timeline/TimelineModel.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 0eec5cae..0e726bde 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -2921,6 +2921,17 @@ TimelineModel::directChatOtherUserId() const return {}; } +mtx::pushrules::PushRuleEvaluator::RoomContext +TimelineModel::pushrulesRoomContext() const +{ + return mtx::pushrules::PushRuleEvaluator::RoomContext{ + .user_display_name = + cache::displayName(room_id_.toStdString(), http::client()->user_id().to_string()), + .member_count = cache::client()->memberCount(room_id_.toStdString()), + .power_levels = permissions_.powerlevelEvent(), + }; +} + RoomSummary * TimelineModel::parentSpace() {