Signed-off-by: brookjeynes me@brookjeynes.dev
+14
go.mod
+14
go.mod
···············
+27
go.sum
+27
go.sum
···+github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=···+github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=+github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=+github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=+github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=+github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=······+github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=···github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=···github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11/go.mod h1:Wlo/SzPmxVp6vXpGt/zaXhHH0fn4IxgqZc82aKg6bpQ=github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e h1:28X54ciEwwUxyHn9yrZfl5ojgF4CBNLWX7LR0rvBkf4=github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so=+github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=+github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
+25
-7
internal/server/log/log.go
+25
-7
internal/server/log/log.go
······
+7
-4
internal/db/db.go
+7
-4
internal/db/db.go
···············
+58
-47
internal/server/handlers/study-session.go
+58
-47
internal/server/handlers/study-session.go
············htmx.HxError(w, http.StatusInternalServerError, "Failed to get global study session feed, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to get global study session feed, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to get global study session feed, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to get global study session feed, try again later.")···feed, err = ApplyPendingChanges(h, w, r, feed, PendingStudySessionCreation, PendingStudySessionUpdates, PendingStudySessionDeletion)······htmx.HxError(w, http.StatusInternalServerError, "Failed to update study session, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to edit this study session.")·········htmx.HxError(w, http.StatusBadRequest, "Failed to update study session, ensure all data is valid.")···htmx.HxError(w, http.StatusBadRequest, "Study session description cannot be more than 256 characters.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to update study session, try again later.")···············htmx.HxError(w, http.StatusBadRequest, "Failed to update study session, ensure all data is valid.")···htmx.HxError(w, http.StatusBadRequest, "Study session description cannot be more than 256 characters.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to create study session, try again later.")···Set("date_is_today", newStudySession.Date.Truncate(24*time.Hour).Equal(time.Now().UTC().In(loc).Truncate(24*time.Hour))),···htmx.HxError(w, http.StatusUnauthorized, "Failed to delete study session, try again later.")······htmx.HxError(w, http.StatusInternalServerError, "Failed to delete study session, try again later.")htmx.HxError(w, http.StatusUnauthorized, "Failed to delete study session, try again later.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to delete study session, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to retrieve study session, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to retrieve bsky profile, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to retrieve profile, try again later.")···func (h *Handler) HandleStudySessionPageCommentFeed(w http.ResponseWriter, r *http.Request) {······commentFeed, err := db.GetCommentsForSession(h.Db, studySessionUri.String(), pageSize+1, int(offset))htmx.HxError(w, http.StatusInternalServerError, "Failed to get comment feed, try again later.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to get comment feed, try again later.")
+31
-26
internal/server/handlers/resource.go
+31
-26
internal/server/handlers/resource.go
·········htmx.HxError(w, http.StatusBadRequest, "Failed to create resource, ensure all fields contain valid data.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to create resource, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to delete resource, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to delete this resource.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to delete resource, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to update resource, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to edit this resource.")···htmx.HxError(w, http.StatusBadRequest, "Failed to create resource, ensure all fields contain valid data.")······if updatedResource.Link != nil && (resource.Link == nil || *updatedResource.Link != *resource.Link) {+l.Error("invalid resource link", "link", resource.Link, "threatType", linkCheckResult.ThreatType, "err", linkCheckResult.Err)···htmx.HxError(w, http.StatusInternalServerError, "Failed to update resource, try again later.")···
+36
-27
internal/server/handlers/comment.go
+36
-27
internal/server/handlers/comment.go
·········htmx.HxError(w, http.StatusInternalServerError, "Failed to create comment, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to delete comment, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to delete this comment.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to delete comment, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to update comment, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to edit this comment.")···htmx.HxError(w, http.StatusBadRequest, "Unable to process comment, please try again later.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to update comment, try again later.")·········htmx.HxError(w, http.StatusBadRequest, "Unable to process comment, please try again later.")······htmx.HxError(w, http.StatusInternalServerError, "Failed to update comment, try again later.")
+11
-10
internal/server/handlers/follow.go
+11
-10
internal/server/handlers/follow.go
··················htmx.HxError(w, http.StatusInternalServerError, "Failed to unfollow profile, try again later.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to unfollow profile, try again later.")···
+29
-24
internal/server/handlers/activity.go
+29
-24
internal/server/handlers/activity.go
·········htmx.HxError(w, http.StatusBadRequest, "Failed to create activity, ensure all fields contain valid data.")······htmx.HxError(w, http.StatusInternalServerError, "Failed to create activity, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to delete activity, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to edit this activity.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to delete activity, try again later.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to update activity, try again later.")htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to edit this activity.")···htmx.HxError(w, http.StatusBadRequest, "Failed to create activity, ensure all fields contain valid data.")······htmx.HxError(w, http.StatusInternalServerError, "Failed to update activity, try again later.")···
+10
-7
internal/server/handlers/notification.go
+10
-7
internal/server/handlers/notification.go
············htmx.HxError(w, http.StatusInternalServerError, "Failed to get notifications, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to get notifications, try again later.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to mark all notifications as read, try again later.")
+17
-17
internal/server/handlers/reaction.go
+17
-17
internal/server/handlers/reaction.go
············htmx.HxError(w, http.StatusInternalServerError, "Failed to get global study session feed, try again later.")htmx.HxError(w, http.StatusInternalServerError, "Failed to get global study session feed, try again later.")···htmx.HxError(w, http.StatusBadRequest, "You cannot react multiple times with the same reaction.")·········htmx.HxError(w, http.StatusInternalServerError, "Failed to remove reaction, try again later.")···htmx.HxError(w, http.StatusInternalServerError, "Failed to remove reaction, try again later.")······
+14
-11
internal/server/handlers/stats.go
+14
-11
internal/server/handlers/stats.go
············
+30
-20
internal/consumer/ingester.go
+30
-20
internal/consumer/ingester.go
·······································err = db.CreateNotification(tx, subjectDid.String(), did, subject.String(), db.NotificationTypeReaction)············err = db.CreateNotification(tx, subjectDid.String(), did, subjectUri.String(), db.NotificationTypeComment)···if comment.ParentCommentUri != nil && comment.ParentCommentUri.Authority().String() != did {err = db.CreateNotification(tx, comment.ParentCommentUri.Authority().String(), did, parentCommentUri.String(), db.NotificationTypeReply)
+2
internal/server/handlers/router.go
+2
internal/server/handlers/router.go
······
+13
-6
internal/server/middleware/middleware.go
+13
-6
internal/server/middleware/middleware.go
······+func New(oauth *oauth.OAuth, db *db.DB, idResolver *atproto.Resolver, logger *slog.Logger) Middleware {···············
+2
-2
internal/server/handlers/login.go
+2
-2
internal/server/handlers/login.go
···-htmx.HxError(w, http.StatusBadGateway, fmt.Sprintf("'%s' is an invalid handle. Did you mean %s.bsky.social?", handle, handle))+htmx.HxError(w, http.StatusBadRequest, fmt.Sprintf("'%s' is an invalid handle. Did you mean %s.bsky.social?", handle, handle))