mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Comments, guard against marshaling nil values
This commit is contained in:
parent
4ddd55522a
commit
967d2ab9df
|
|
@ -270,10 +270,12 @@ func (r *FederationInternalAPI) performJoinUsingServer(
|
||||||
// If we successfully performed a send_join above then the other
|
// If we successfully performed a send_join above then the other
|
||||||
// server now thinks we're a part of the room. Send the newly
|
// server now thinks we're a part of the room. Send the newly
|
||||||
// returned state to the roomserver to update our local view.
|
// returned state to the roomserver to update our local view.
|
||||||
event, err = event.SetUnsigned(unsigned)
|
if unsigned != nil {
|
||||||
if err != nil {
|
event, err = event.SetUnsigned(unsigned)
|
||||||
// non-fatal, log and continue
|
if err != nil {
|
||||||
logrus.WithError(err).Errorf("Failed to set prev content")
|
// non-fatal, log and continue
|
||||||
|
logrus.WithError(err).Errorf("Failed to set unsigned content")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = roomserverAPI.SendEventWithState(
|
if err = roomserverAPI.SendEventWithState(
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ func (r *Joiner) performFederatedJoinRoomByID(
|
||||||
UserID: req.UserID, // the user ID joining the room
|
UserID: req.UserID, // the user ID joining the room
|
||||||
ServerNames: req.ServerNames, // the server to try joining with
|
ServerNames: req.ServerNames, // the server to try joining with
|
||||||
Content: req.Content, // the membership event content
|
Content: req.Content, // the membership event content
|
||||||
Unsigned: req.Unsigned,
|
Unsigned: req.Unsigned, // the unsigned event content, if any
|
||||||
}
|
}
|
||||||
fedRes := fsAPI.PerformJoinResponse{}
|
fedRes := fsAPI.PerformJoinResponse{}
|
||||||
r.FSAPI.PerformJoin(ctx, &fedReq, &fedRes)
|
r.FSAPI.PerformJoin(ctx, &fedReq, &fedRes)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue