best_name function should be using pidgin's functionality
Status: Alpha
Brought to you by:
maxcow
Rather than using the logic in the best_name functionality. libnotify should be using the built-in functionality of pidgin. There is already a function purple_buddy_get_contact_alias which returns the correct alias.
The reason I found this is because the notification is returning the screenname rather than the Contact's alias which should have precedence.
The documentation for this function can be found here including the order of precedence on the display name.
http://developer.pidgin.im/doxygen/2.5.2/html/blist_8h.html#b22ef857cab96ceb9ddef8fde9e47199
Patch for the best_name function
I think your patch has a mistake in it.
On line 6 of your patch you have:
static gchar *
but on line 7 you have:
+const static gchar *
I think line 6 maybe needs to be removed? I get errors when trying to compile with your patch added.
Yes, it looks like line 6 of the patch is missing the minus (-) for some reason at the beginning of the line. Sorry about that.