mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 15:05:11 +00:00
[ADD/WIP] No-flying and unlinking MUCs
This is more of a retroactive thing.
This commit is contained in:
parent
7d1893bf75
commit
a3bef5c0c1
5 changed files with 80 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue