diff options
| author | 2025-09-07 18:16:43 +0200 | |
|---|---|---|
| committer | 2025-09-07 18:16:43 +0200 | |
| commit | 9b7db51436f1f85697e3c07281a70ef1e7752256 (patch) | |
| tree | 06e0515d0e4f1916c9a10d5f4bd912c93b8e18d5 /internal/processing | |
| parent | [bugfix] ensure std log writer passes byte slices along as string, or JSON wi... (diff) | |
| download | gotosocial-9b7db51436f1f85697e3c07281a70ef1e7752256.tar.xz | |
[bugfix] check for nil notification (#4417)
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4417
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing')
| -rw-r--r-- | internal/processing/timeline/notification.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/processing/timeline/notification.go b/internal/processing/timeline/notification.go index b17dda8a7..7b98970c2 100644 --- a/internal/processing/timeline/notification.go +++ b/internal/processing/timeline/notification.go @@ -166,6 +166,14 @@ func (p *Processor) NotificationGet(ctx context.Context, account *gtsmodel.Accou return nil, gtserror.NewErrorInternalError(err) } + if notif == nil { + const text = "notification not found" + return nil, gtserror.NewErrorNotFound( + errors.New(text), + text, + ) + } + if notif.TargetAccountID != account.ID { err := gtserror.New("requester does not match notification target") return nil, gtserror.NewErrorNotFound(err) |
