Allow printing users who lack email addresses

This commit is contained in:
Craig Everett 2019-12-21 19:32:41 +09:00
parent ebfa62ecda
commit 98d8f5392d

View File

@ -566,8 +566,11 @@ zsp_path(PackageID = {Realm, _, _}) ->
-spec print_user({zx:user_name(), zx:real_name(), [zx:contact_info()]}) -> ok. -spec print_user({zx:user_name(), zx:real_name(), [zx:contact_info()]}) -> ok.
print_user({UserName, RealName, [{"email", Email}]}) -> print_user({UserName, RealName, ContactInfo}) ->
io:format("~ts (~ts <~ts>) ~n", [UserName, RealName, Email]). case proplist:get_value("email", ContactInfo, none) of
none -> io:format("~ts (~ts)~n", [UserName, RealName]);
Email -> io:format("~ts (~ts) <~ts>~n", [UserName, RealName, Email])
end.
-spec find_latest_compatible(Version, Versions) -> Result -spec find_latest_compatible(Version, Versions) -> Result