contact-store: disallow data: urls from being added
!=(contact(last-updated *@da) u.old(last-updated *@da))
==
[~ state]
+ ~| "cannot add a data url to cover!"
+ ?> ?| ?=(~ cover.contact)
+ !=('data:' (cut 3 [0 5] u.cover.contact))
+ ==
+ ~| "cannot add a data url to avatar!"
+ ?> ?| ?=(~ avatar.contact)
+ !=('data:' (cut 3 [0 5] u.avatar.contact))
+ ==
:- (send-diff [%add ship contact] =(ship our.bowl))
state(rolodex (~(put by rolodex) ship contact))
::
=/ contact (edit-contact old edit-field)
?: =(old contact)
[~ state]
+ ~| "cannot add a data url to cover!"
+ ?> ?| ?=(~ cover.contact)
+ !=('data:' (cut 3 [0 5] u.cover.contact))
+ ==
+ ~| "cannot add a data url to avatar!"
+ ?> ?| ?=(~ avatar.contact)
+ !=('data:' (cut 3 [0 5] u.avatar.contact))
+ ==
=. last-updated.contact timestamp
:- (send-diff [%edit ship edit-field timestamp] =(ship our.bowl))
state(rolodex (~(put by rolodex) ship contact))
