Matrix currently has a significant moderation loophole, thanks to invites. Right now, anyone can invite anyone to a room - and clients like NeoChat will gladly display these rooms to them and even give you a notification. However, this creates a pretty easy attack since room names and avatars are arbitrary and this is a known vector of harassment in the Matrix community. There's currently no tools to block this server-side, so let's try to improve the situation where we can. This adds a new setting to the Security page, wherein it allows you to block invites from people you don't share a room with. This prevents the notification from appearing and NeoChat will attempt to leave the room immediately. Since this depends on MSC 2666 - a currently unstable feature - the server may not support it and NeoChat will disable the setting in this case.
15 lines
508 B
C++
15 lines
508 B
C++
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "neochatgetcommonroomsjob.h"
|
|
|
|
using namespace Quotient;
|
|
|
|
NeochatGetCommonRoomsJob::NeochatGetCommonRoomsJob(const QString &userId)
|
|
: BaseJob(HttpVerb::Get,
|
|
QStringLiteral("GetCommonRoomsJob"),
|
|
QStringLiteral("/_matrix/client/unstable/uk.half-shot.msc2666/user/mutual_rooms").toLatin1(),
|
|
QUrlQuery({{QStringLiteral("user_id"), userId}}))
|
|
{
|
|
}
|