From f1f2044c2f2bc24ea2a08c58b4517e1e07f4039c Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Wed, 10 Nov 2021 15:45:27 -0400 Subject: it compiles now --- db/cache.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'db/cache.go') diff --git a/db/cache.go b/db/cache.go index 6f1ee8f..dff1987 100644 --- a/db/cache.go +++ b/db/cache.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/FChannel0/FChannel-Server/activitypub" + "github.com/FChannel0/FChannel-Server/util" "github.com/FChannel0/FChannel-Server/webfinger" _ "github.com/lib/pq" ) @@ -81,9 +82,9 @@ func WriteActorObjectToCache(obj activitypub.ObjectBase) (activitypub.ObjectBase } func WriteActivitytoCache(obj activitypub.ObjectBase) error { - obj.Name = EscapeString(obj.Name) - obj.Content = EscapeString(obj.Content) - obj.AttributedTo = EscapeString(obj.AttributedTo) + obj.Name = util.EscapeString(obj.Name) + obj.Content = util.EscapeString(obj.Content) + obj.AttributedTo = util.EscapeString(obj.AttributedTo) query := `select id from cacheactivitystream where id=$1` @@ -113,9 +114,9 @@ func WriteActivitytoCache(obj activitypub.ObjectBase) error { } func WriteActivitytoCacheWithAttachment(obj activitypub.ObjectBase, attachment activitypub.ObjectBase, preview activitypub.NestedObjectBase) error { - obj.Name = EscapeString(obj.Name) - obj.Content = EscapeString(obj.Content) - obj.AttributedTo = EscapeString(obj.AttributedTo) + obj.Name = util.EscapeString(obj.Name) + obj.Content = util.EscapeString(obj.Content) + obj.AttributedTo = util.EscapeString(obj.AttributedTo) query := `select id from cacheactivitystream where id=$1` -- cgit v1.2.3