Skip to content

Add first seen date to subscription.#31

Merged
davidnewhall merged 2 commits into
mainfrom
dn2_first
Jul 20, 2026
Merged

Add first seen date to subscription.#31
davidnewhall merged 2 commits into
mainfrom
dn2_first

Conversation

@davidnewhall

@davidnewhall davidnewhall commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Simple features (first seen + delete), and some lint fixes.

@davidnewhall
davidnewhall requested a review from Copilot July 20, 2026 20:36
@davidnewhall
davidnewhall merged commit de586e9 into main Jul 20, 2026
9 checks passed
@davidnewhall
davidnewhall deleted the dn2_first branch July 20, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “first seen” timestamp to subscriber records so the system can track when a subscription entry was originally created, along with a small API addition and minor lint/test cleanups.

Changes:

  • Add Subscriber.FirstSeen and populate it on subscriber creation (CreateSub / CreateSubWithID).
  • Persist/copy FirstSeen through snapshotting for JSON state operations.
  • Add DeleteSubscriber(subID, api) plus tests; minor test refactors and golangci-lint config tweak.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
types.go Adds Subscriber.FirstSeen with JSON tag to represent record creation time.
subscriber.go Sets FirstSeen on create; introduces DeleteSubscriber API.
database.go Ensures snapshots include FirstSeen so state JSON preserves it.
subscriber_test.go Extends tests to assert FirstSeen behavior and covers DeleteSubscriber.
subscription_test.go Minor lint cleanup (deduplicates string literal via const).
.golangci.yml Disables gomodguard (noted as deprecated) under default: all.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread subscriber.go
Comment on lines +80 to +86
for i, sub := range s.Subscribers {
if sub.ID == subID && sub.API == api {
s.Subscribers = append(s.Subscribers[:i], s.Subscribers[i+1:]...)

return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants