[GSoC 2012] Planned API changes - RFC
tomkiewicz.groups at gmail.com
Tue Jul 3 06:14:17 EDT 2012
>> 1) trimming whitespaces from usernames
> I don't think trimming whitespace is generally a good thing globally,
> it should probably be on a per-prpl basis, in case whitespace is
> important to a prpl
Good point. What about OPT_PROTO_TRIM_USERNAME option? In that case, I
think it should be handled at libpurple side.
>> 2) username validation
> Does username normalisation count as validation?
At this point - no. Invalid usernames should not be allowed to type in
dialogs like account setup.
But we can use normalize function - there is only need to specify,
that if it returns NULL, that mean username is totally invalid. For
example, in number-based usernames, normalization for "[space]1234"
will return "1234", but for "1234x" will it be NULL. That also have to
be handled in UI.
Also, there may be a need for another option, let's say
OPT_PROTO_STORE_NORMALIZED, to store only normalized usernames. We
don't need to have "[space]1234" contact on buddy list, "1234" will be
>> 3) ability to change labels for "username"
> There's currently the UI hint for what should be entered into the
> username box via the prpl_info->get_account_text_table(), is this not
I missed that, thanks. It's not used in buddy adding dialog, but I can fix this.
Thanks, waiting for more comments,
More information about the Devel