From 5ca86b1c575f9c42ad8d3d4a2b2d3e70c89e90df Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:02:04 +0100 Subject: [chore] Harden up boolptr logic on Accounts, warn if not set (#2544) --- internal/ap/extract.go | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'internal/ap/extract.go') diff --git a/internal/ap/extract.go b/internal/ap/extract.go index 11c20494c..2b49c6477 100644 --- a/internal/ap/extract.go +++ b/internal/ap/extract.go @@ -492,18 +492,6 @@ func ExtractFields(i WithAttachment) []*gtsmodel.Field { return fields } -// ExtractDiscoverable extracts the Discoverable boolean -// of the given WithDiscoverable interface. Will return -// an error if Discoverable was nil. -func ExtractDiscoverable(i WithDiscoverable) (bool, error) { - discoverableProp := i.GetTootDiscoverable() - if discoverableProp == nil { - return false, gtserror.New("discoverable was nil") - } - - return discoverableProp.Get(), nil -} - // ExtractURL extracts the first URI it can find from the // given WithURL interface, or an error if no URL was set. // The ID of a type will not work, this function wants a URI -- cgit v1.2.3