Closed pigmonkey closed 11 years ago
What I like about this and issue #24 is that they are things that were features of an early prototype version of ppl that I decided not to bother with until other priorities were sorted out. There's even an old Ppl::Entity::Email class with a preferred
attribute from when this existed.
So yeah, both of these are definitely going to happen. Just a question of when. Now that I know somebody other than me thinks it'd be useful too, I might as well build them in the near future.
Damn, this was a surprisingly large amount of refactoring. I guess that's the difference between "array of strings attached to contact" and "entity with its own properties which can be updated independently", which is the transition email addresses and phone numbers had to go through.
Anyway, it's in 1.24.0
.
The vCard specification includes a
PREF
type that can be added to email and phone entries to specify the preferred address or number. It would be great if ppl could support this.If a phone has the
PREF
type, ppl could put it at the top of the list of phone numbers in the output ofppl show ...
. Or perhaps ppl should prepend a special character to it, such as*
.If an email has the
PREF
type, ppl should display it in<
/>
next to the contact's name in the output ofppl show ...
, as well as being ordered or displayed in the list of email addresses the same as the preferred phone number is displayed in its list.The preferred email could be specified like this:
This would check if the email john@doe.com already exists for
jdoe
. If it does, it would set its type toPREF
(and remove thePREF
type from any other emails, if it exists). If it does not exist, it would add the email and set the type toPREF
. The same behaviour could be used for adding or specifying the preferred phone number.