From d2773ea25e27d3f9944c357c5e24bdd9e828b658 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Mon, 19 Jan 2026 17:47:57 +0000 Subject: [PATCH] appview: remove `db.GetReaction()` After refactoring record deletion logic, we only need `db.GetReactionStatus` Signed-off-by: Seongmin Lee --- appview/db/reaction.go | 28 ---------------------------- 1 file(s) changed, 0 insertion(s)(+), 28 deletion(s)(-) diff --git a/appview/db/reaction.go b/appview/db/reaction.go --- a/appview/db/reaction.go +++ b/appview/db/reaction.go @@ -2,7 +2,6 @@ import ( "fmt" - "log" "time" "github.com/bluesky-social/indigo/atproto/syntax" @@ -25,32 +24,6 @@ reaction.Created.Format(time.RFC3339), ) return err -} - -// Get a reaction record -func GetReaction(e Execer, did string, subjectAt syntax.ATURI, kind models.ReactionKind) (*models.Reaction, error) { - query := ` - select did, subject_at, created, rkey - from reactions - where did = ? and subject_at = ? and kind = ?` - row := e.QueryRow(query, did, subjectAt, kind) - - var reaction models.Reaction - var created string - err := row.Scan(&reaction.ReactedByDid, &reaction.ThreadAt, &created, &reaction.Rkey) - if err != nil { - return nil, err - } - - createdAtTime, err := time.Parse(time.RFC3339, created) - if err != nil { - log.Println("unable to determine followed at time") - reaction.Created = time.Now() - } else { - reaction.Created = createdAtTime - } - - return &reaction, nil } // Remove a reaction @@ -215,7 +188,6 @@ if _, ok := result[aturi]; !ok { result[aturi] = make(map[models.ReactionKind]bool) } - result[aturi][kind] = true } -- tangled.sh