diff --git a/internal/connection/connection.go b/internal/connection/connection.go index 679d3f9..a7146d8 100644 --- a/internal/connection/connection.go +++ b/internal/connection/connection.go @@ -80,14 +80,7 @@ func Put(ctx context.Context, sess *oauth.ClientSession, db *sql.DB, rec Record) rec.ConnectedAt = time.Now().UTC() } - value := map[string]any{ - "$type": NSID, - "with": rec.With.String(), - "connectedAt": rec.ConnectedAt.UTC().Format(time.RFC3339), - } - if rec.EventURI != "" { - value["event"] = rec.EventURI - } + value := buildConnectionValue(rec.With, rec.ConnectedAt, rec.EventURI) input := map[string]any{ "repo": sess.Data.AccountDID.String(),