Signed-off-by: brookjeynes me@brookjeynes.dev
+14
go.mod
+14
go.mod
···············
···············
+27
go.sum
+27
go.sum
······github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=············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/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/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.StatusInternalServerError, "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.")·········commentFeed, err := db.GetCommentsForSession(h.Db, studySessionUri.String(), pageSize+1, int(offset))···
············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.StatusInternalServerError, "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.")·········commentFeed, err := db.GetCommentsForSession(h.Db, studySessionUri.String(), pageSize+1, int(offset))···
+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.StatusUnauthorized, "You do not have permissions to delete 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) {······
·········htmx.HxError(w, http.StatusBadRequest, "Failed to create resource, ensure all fields contain valid data.")··················htmx.HxError(w, http.StatusUnauthorized, "You do not have permissions to delete 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)······
+36
-27
internal/server/handlers/comment.go
+36
-27
internal/server/handlers/comment.go
···················································
···················································
+11
-10
internal/server/handlers/follow.go
+11
-10
internal/server/handlers/follow.go
························
························
+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.StatusBadRequest, "Failed to create activity, ensure all fields contain valid data.")·········
·········htmx.HxError(w, http.StatusBadRequest, "Failed to create activity, ensure all fields contain valid data.")······························htmx.HxError(w, http.StatusBadRequest, "Failed to create activity, ensure all fields contain valid data.")·········
+10
-7
internal/server/handlers/notification.go
+10
-7
internal/server/handlers/notification.go
···············htmx.HxError(w, http.StatusInternalServerError, "Failed to mark all notifications as read, 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 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.")··················
+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)···err = db.CreateNotification(tx, comment.ParentCommentUri.Authority().String(), did, parentCommentUri.String(), db.NotificationTypeReply)
·······································err = db.CreateNotification(tx, subjectDid.String(), did, subject.String(), db.NotificationTypeReaction)············err = db.CreateNotification(tx, subjectDid.String(), did, subjectUri.String(), db.NotificationTypeComment)···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))