diff --git a/outbox/create.go b/outbox/create.go index 528713c4..0bdd36be 100644 --- a/outbox/create.go +++ b/outbox/create.go @@ -71,7 +71,7 @@ func Create(ctx context.Context, domain string, cfg *cfg.Config, log *slog.Logge return fmt.Errorf("failed to insert note: %w", err) } - if _, err = tx.ExecContext(ctx, `insert into outbox (activity, sender) values(?,?)`, j, author.ID); err != nil { + if _, err = tx.ExecContext(ctx, `insert into outbox (activity, sender) values(?,?)`, string(j), author.ID); err != nil { return fmt.Errorf("failed to insert Create: %w", err) } diff --git a/outbox/delete.go b/outbox/delete.go index 024080b8..48fd1d16 100644 --- a/outbox/delete.go +++ b/outbox/delete.go @@ -93,7 +93,7 @@ func Delete(ctx context.Context, domain string, cfg *cfg.Config, log *slog.Logge if _, err := tx.ExecContext( ctx, `INSERT INTO outbox (activity, sender) VALUES (?,?)`, - j, + string(j), note.AttributedTo, ); err != nil { return fmt.Errorf("failed to insert delete activity: %w", err) diff --git a/outbox/update.go b/outbox/update.go index 15a9e44d..225d48fa 100644 --- a/outbox/update.go +++ b/outbox/update.go @@ -76,7 +76,7 @@ func UpdateNote(ctx context.Context, domain string, cfg *cfg.Config, log *slog.L if _, err := tx.ExecContext( ctx, `INSERT INTO outbox (activity, sender) VALUES(?,?)`, - j, + string(j), note.AttributedTo, ); err != nil { return fmt.Errorf("failed to insert update activity: %w", err)