mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 22:22:46 +00:00
Federation fixes for virtual hosting
This commit is contained in:
parent
f4ee397734
commit
6650712a1c
73 changed files with 736 additions and 420 deletions
|
@ -278,7 +278,11 @@ func (w *worker) _next() {
|
|||
// a string, because we might want to return that to the caller if
|
||||
// it was a synchronous request.
|
||||
var errString string
|
||||
if err = w.r.processRoomEvent(w.r.ProcessContext.Context(), &inputRoomEvent); err != nil {
|
||||
if err = w.r.processRoomEvent(
|
||||
w.r.ProcessContext.Context(),
|
||||
gomatrixserverlib.ServerName(msg.Header.Get("virtual_host")),
|
||||
&inputRoomEvent,
|
||||
); err != nil {
|
||||
switch err.(type) {
|
||||
case types.RejectedError:
|
||||
// Don't send events that were rejected to Sentry
|
||||
|
@ -358,6 +362,7 @@ func (r *Inputer) queueInputRoomEvents(
|
|||
if replyTo != "" {
|
||||
msg.Header.Set("sync", replyTo)
|
||||
}
|
||||
msg.Header.Set("virtual_host", string(request.VirtualHost))
|
||||
msg.Data, err = json.Marshal(e)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("json.Marshal: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue