dev vouch dev on at. thats about it
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview: add vouch.received_at

Luna 15a349ce 33c3d6c9

+16 -2
+2 -1
appview/lib/atvouch/tap_handler.ex
··· 84 84 remote_created_at: created_at, 85 85 remote_updated_timestamp: false, 86 86 at_cid: event.cid, 87 - live: event.live 87 + live: event.live, 88 + received_at: DateTime.utc_now() |> DateTime.to_iso8601() 88 89 }) do 89 90 {:ok, _vouch} -> :ok 90 91 {:error, reason} -> {:error, reason}
+2 -1
appview/lib/atvouch/vouch.ex
··· 12 12 field(:remote_updated_timestamp, :boolean, default: false) 13 13 field(:at_cid, :string) 14 14 field(:live, :boolean, default: false) 15 + field(:received_at, :string) 15 16 end 16 17 17 18 def changeset(vouch, attrs) do 18 19 vouch 19 - |> cast(attrs, [:at_uri, :creator_did, :target_did, :original_created_at, :remote_created_at, :remote_updated_timestamp, :at_cid, :live]) 20 + |> cast(attrs, [:at_uri, :creator_did, :target_did, :original_created_at, :remote_created_at, :remote_updated_timestamp, :at_cid, :live, :received_at]) 20 21 |> validate_required([:at_uri, :creator_did, :target_did, :original_created_at, :remote_created_at, :at_cid]) 21 22 |> foreign_key_constraint(:creator_did) 22 23 |> unique_constraint(:at_uri, name: :vouches_pkey)
+9
appview/priv/repo/migrations/20260311005729_add_received_at_to_vouches.exs
··· 1 + defmodule Atvouch.Repo.Migrations.AddReceivedAtToVouches do 2 + use Ecto.Migration 3 + 4 + def change do 5 + alter table(:vouches) do 6 + add(:received_at, :string) 7 + end 8 + end 9 + end
+3
appview/test/atvouch/tap_handler_test.exs
··· 66 66 assert vouch.remote_updated_timestamp == false 67 67 assert vouch.at_cid == "bafyreig2uvo5annaomcmrjfrwyshnjannfrr2xje5txnsyuk7l4o2tdmju" 68 68 assert vouch.live == false 69 + assert vouch.received_at != nil 70 + {:ok, parsed, _} = DateTime.from_iso8601(vouch.received_at) 71 + assert DateTime.diff(DateTime.utc_now(), parsed, :second) < 5 69 72 70 73 # Identities should be created with nil handle and status 71 74 creator = Atvouch.Identity.one(creator_did)