From 135adaab04417939cc9b0c0b9a662c1056ef430a Mon Sep 17 00:00:00 2001 From: sneak Date: Sat, 14 Dec 2019 08:43:34 -0800 Subject: [PATCH] fetches now but consumes all memory and dies :( --- instance.go | 2 ++ jsonapis.go | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/instance.go b/instance.go index 220d2d7..ba58fb4 100644 --- a/instance.go +++ b/instance.go @@ -433,6 +433,8 @@ func (i *instance) fetchRecentToots() error { Msgf("unable to parse recent toot list") i.registerError() i.Event("TOOT_FETCH_ERROR") + + fmt.Printf(string(body)) return err } diff --git a/jsonapis.go b/jsonapis.go index f1b3393..01bd304 100644 --- a/jsonapis.go +++ b/jsonapis.go @@ -2,6 +2,7 @@ package feta import "time" import "fmt" +import "encoding/json" // thank fuck for https://mholt.github.io/json-to-go/ otherwise // this would have been a giant pain in the dick @@ -92,7 +93,10 @@ func (atl *apTootList) String() string { return fmt.Sprintf("%+v", atl) } -type apTootList []struct { +type apTootList []json.RawMessage + +/* +type parsedToot struct { Account struct { Acct string `json:"acct"` Avatar string `json:"avatar"` @@ -152,3 +156,4 @@ type apTootList []struct { URL string `json:"url"` Visibility string `json:"visibility"` } +*/