Some more debug logging

This commit is contained in:
Neil Alexander 2022-08-17 15:15:08 +01:00
parent 824841b765
commit 410dd9248b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -842,7 +842,7 @@ func (r *Queryer) QueryRestrictedJoinAllowed(ctx context.Context, req *api.Query
}
var joinRules gomatrixserverlib.JoinRuleContent
if err = json.Unmarshal(joinRulesEvent.Content(), &joinRules); err != nil {
return fmt.Errorf("json.Unmarshal: %w", err)
return fmt.Errorf("json.Unmarshal: %w (JSON content: %s)", err, joinRulesEvent.Content())
}
// If the join rule isn't "restricted" then there's nothing more to do.
res.Restricted = joinRules.JoinRule == gomatrixserverlib.Restricted