improve debug logging, fix stringer interface, debuglog events sent, fix debuglogging affecting the actual values.

This commit is contained in:
fiatjaf
2023-04-11 11:02:35 -03:00
parent 7f64f2f65e
commit 32768b1a5b
5 changed files with 32 additions and 18 deletions

View File

@@ -300,7 +300,7 @@ func (r *Relay) Publish(ctx context.Context, event Event) (Status, error) {
defer r.okCallbacks.Delete(event.ID)
// publish event
message := []interface{}{"EVENT", event}
message := []any{"EVENT", event}
debugLog("{%s} sending %v\n", r.URL, message)
if err := r.Connection.WriteJSON(message); err != nil {
return status, err