mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-29 08:18:27 +00:00
21 lines
382 B
Go
21 lines
382 B
Go
|
package internal
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/matrix-org/dendrite/roomserver/api"
|
||
|
)
|
||
|
|
||
|
func (r *RoomserverInternalAPI) PerformPublish(
|
||
|
ctx context.Context,
|
||
|
req *api.PerformPublishRequest,
|
||
|
res *api.PerformPublishResponse,
|
||
|
) {
|
||
|
err := r.DB.PublishRoom(ctx, req.RoomID, req.Visibility == "public")
|
||
|
if err != nil {
|
||
|
res.Error = &api.PerformError{
|
||
|
Msg: err.Error(),
|
||
|
}
|
||
|
}
|
||
|
}
|