From f3627deef0848b95a083d9e16468b0f8484d784e Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 15 Jul 2026 23:52:45 -0500 Subject: feat: show the meta.sr.ht audit log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit auditLog existed in the API but was never called, so the record of what has happened to your account — logins, key changes, the addresses they came from — was web-only. Sits under the tokens in Profile and loads on demand for the same reason they do: an audit log is something you go looking for, not something worth a request on every profile view. One page, newest first; the archive stays on meta.sr.ht. Its errors are kept separate from the shared `error` so a failed audit fetch cannot bury a profile save failure, and vice versa. --- Hutch/Models/Meta.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Hutch/Models') diff --git a/Hutch/Models/Meta.swift b/Hutch/Models/Meta.swift index 91bd7e3..f52fc76 100644 --- a/Hutch/Models/Meta.swift +++ b/Hutch/Models/Meta.swift @@ -69,3 +69,13 @@ struct PersonalAccessToken: Codable, Sendable, Identifiable { let comment: String? let grants: String? } + +/// One entry in meta.sr.ht's audit log: a security-relevant action on the +/// account, with the address it came from. +struct AuditLogEntry: Codable, Sendable, Identifiable { + let id: Int + let created: Date + let ipAddress: String + let eventType: String + let details: String? +} -- cgit v1.2.3