From 730c23626fb5c5b31d90ff5c6ae44c319af88cf6 Mon Sep 17 00:00:00 2001 From: Joe Constant Date: Thu, 22 Feb 2024 21:03:31 -0700 Subject: [PATCH] Adjust schema to add additional fields --- internal/model/actor.go | 11 +++++++---- test-send.go | 16 +++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/internal/model/actor.go b/internal/model/actor.go index 0b5157f..318e627 100644 --- a/internal/model/actor.go +++ b/internal/model/actor.go @@ -1,8 +1,11 @@ package model type Actor struct { - ActorType string `json:"actor_type"` - Id string `json:"id"` - PublicKey string `json:"public_key"` - PrivateKey string `json:"private_key"` + ActorType string `json:"actor_type"` + Id string `json:"id"` + DisplayName string `json:"display_name"` + Bio string `json:"bio"` + MatrixUserId string `json:"matrix_user_id"` + PublicKey string `json:"public_key"` + PrivateKey string `json:"private_key"` } diff --git a/test-send.go b/test-send.go index 5d62974..889179e 100644 --- a/test-send.go +++ b/test-send.go @@ -27,13 +27,15 @@ func main() { defer cancel() body := ` - { - "actor_type": "user", - "id": "lazyguru@discuss.online", - "private_key": "some super secure string", - "public_key": "the public key" - } - ` +{ + "actor_type": "user", + "id": "lazyguru@discuss.online", + "display_name": "Lazyguru", + "bio": "I am a lazy guru", + "matrix_user_id": "@lazyguru:discuss.online", + "private_key": "some super secure string", + "public_key": "the public key" +}` err = ch.ExchangeDeclare( "federation", // name "direct", // type