mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
Add missing Clone, fix comments
This commit is contained in:
parent
0d68e49ac8
commit
c6eb79133c
|
|
@ -647,6 +647,8 @@ func MakeFedAPI(
|
|||
// add the user to Sentry, if enabled
|
||||
hub := sentry.GetHubFromContext(req.Context())
|
||||
if hub != nil {
|
||||
// clone the hub, so we don't send garbage events with e.g. mismatching rooms/event_ids
|
||||
hub = hub.Clone()
|
||||
hub.Scope().SetTag("origin", string(fedReq.Origin()))
|
||||
hub.Scope().SetTag("uri", fedReq.RequestURI())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ func MakeAuthAPI(
|
|||
// add the user to Sentry, if enabled
|
||||
hub := sentry.GetHubFromContext(req.Context())
|
||||
if hub != nil {
|
||||
// clone the hub, so we don't sent garbage events with e.g. mismatching rooms/event_ids
|
||||
// clone the hub, so we don't send garbage events with e.g. mismatching rooms/event_ids
|
||||
hub = hub.Clone()
|
||||
hub.Scope().SetUser(sentry.User{
|
||||
Username: device.UserID,
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ func MakeRelayAPI(
|
|||
// add the user to Sentry, if enabled
|
||||
hub := sentry.GetHubFromContext(req.Context())
|
||||
if hub != nil {
|
||||
// clone the hub, so we don't sent garbage events with e.g. mismatching rooms/event_ids
|
||||
// clone the hub, so we don't send garbage events with e.g. mismatching rooms/event_ids
|
||||
hub = hub.Clone()
|
||||
hub.Scope().SetTag("origin", string(fedReq.Origin()))
|
||||
hub.Scope().SetTag("uri", fedReq.RequestURI())
|
||||
|
|
|
|||
Loading…
Reference in a new issue