[MOD] Do NOT JUST RANDOMLY BRIDGE PLUMBED MUCS

See README.MD for further thoughts that shall eventually be implemented.
Still need to deal with MUC/room "consent". PM'ing the MUC owner with a
form/using commands may be a nice course of action for that.
This commit is contained in:
LDA 2024-07-14 12:01:07 +02:00
commit 9e5e741989
3 changed files with 24 additions and 14 deletions

View file

@ -85,6 +85,18 @@ RouteHead(RouteRoomAck, arr, argp)
);
goto end;
}
if ((chatid = ParseeGetFromMUCID(args->data, muc)))
{
/* TODO: Should we map the plumbed MUC? */
Free(chatid);
chatid = NULL;
HttpResponseStatus(args->ctx, HTTP_METHOD_NOT_ALLOWED);
response = MatrixCreateError(
"M_UNRECOGNIZED",
"Room is already plumbed"
);
goto end;
}
creator = StrConcat(
4,
"@", args->data->config->sender_localpart, ":",