Fix room mentions warning being displayed even without permissions

This commit is contained in:
Nicolas Werner 2024-05-07 23:26:01 +02:00
parent 821390c7d6
commit 82d9e57b6a
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 3 additions and 3 deletions

View file

@ -604,7 +604,7 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare( FetchContent_Declare(
MatrixClient MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG 4fb7d678aeea197d16b52bfb1dc35b506673bb52 GIT_TAG 58af2030c22e2dae7d6156c70572714c6363acee
) )
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")

View file

@ -223,7 +223,7 @@ modules:
buildsystem: cmake-ninja buildsystem: cmake-ninja
name: mtxclient name: mtxclient
sources: sources:
- commit: 4fb7d678aeea197d16b52bfb1dc35b506673bb52 - commit: 58af2030c22e2dae7d6156c70572714c6363acee
#tag: v0.9.2 #tag: v0.9.2
type: git type: git
url: https://github.com/Nheko-Reborn/mtxclient.git url: https://github.com/Nheko-Reborn/mtxclient.git

View file

@ -241,7 +241,7 @@ InputBar::updateTextContentProperties(const QString &t, bool charDeleted)
} }
} }
auto roomMention = containsRoomMention(t); auto roomMention = containsRoomMention(t) && this->room->permissions()->canPingRoom();
if (roomMention != this->containsAtRoom_) { if (roomMention != this->containsAtRoom_) {
if (roomMention) if (roomMention)