mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 04:04:02 +03:00
Merge pull request #6150 from urbit/philip/contact-fix
contact-store: no-op if adding old contact
This commit is contained in:
commit
36deb95411
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3306a5b916caa838c67cb079410c6e5bb158054520129ffb9f9bdb144ab1b691
|
||||
size 7418493
|
||||
oid sha256:ea8626444e4f0213e39c21ded20607145ee85a947afc592f182f46e7f598ef30
|
||||
size 7748671
|
||||
|
@ -123,7 +123,15 @@
|
||||
:: ensure difference
|
||||
=/ old=(unit contact:store) (~(get by rolodex) ship)
|
||||
?. ?| ?=(~ old)
|
||||
!=(contact(last-updated *@da) u.old(last-updated *@da))
|
||||
:: if new contact is before existing contact, no-op
|
||||
::
|
||||
:: NB: last-updated.contact is often *@da, so this
|
||||
:: effectively stops add from applying if we already have
|
||||
:: a contact for them
|
||||
::
|
||||
?& (gth last-updated.contact last-updated.u.old)
|
||||
!=(contact(last-updated *@da) u.old(last-updated *@da))
|
||||
==
|
||||
==
|
||||
[~ state]
|
||||
~| "cannot add a data url to cover!"
|
||||
|
Loading…
Reference in New Issue
Block a user