[ADD/WIP] No-flying and unlinking MUCs

This is more of a retroactive thing.
This commit is contained in:
LDA 2024-07-04 10:57:36 +02:00
commit a3bef5c0c1
5 changed files with 80 additions and 3 deletions

View file

@ -68,7 +68,15 @@ RouteHead(RouteRoomAck, arr, argp)
}
muc = ParseeDecodeLocalMUC(args->data->config, room);
Log(LOG_INFO, "room=%s", muc);
if (!ParseeManageBan(args->data, muc, NULL))
{
HttpResponseStatus(args->ctx, HTTP_METHOD_NOT_ALLOWED);
response = MatrixCreateError(
"M_NOT_FOUND",
"XMPP MUC is banned from being accessed on this instance"
);
goto end;
}
if (!XMPPQueryMUC(args->data->jabber, muc, &info))
{
HttpResponseStatus(args->ctx, HTTP_METHOD_NOT_ALLOWED);
@ -76,7 +84,6 @@ RouteHead(RouteRoomAck, arr, argp)
"M_UNRECOGNIZED",
"Room does not map to a real XMPP MUC"
);
Log(LOG_INFO, "No MUC");
goto end;
}
creator = StrConcat(