xb95 (xb95) wrote in lj_dev,

Patch: getfriends returning birthdays

In this thread phinnia suggested that LochJournal be aware of birthdays of people on your friends list. Instead of parsing birthday.bml, I figured I'd put together a patch for the getfriends mode.

Basically, this five line patch to ljprotocol.pl makes it return one new item in the getfriends mode:

friend_X_birthday = YYYY-MM-DD

It checks user.allow_infoshow as well as makes sure the user didn't leave it blank before returning the key. If the user doesn't want their info shown or doesn't have a birthday, nothing is returned. I could have returned 0's, but to save bandwidth...

Anyway, the patch is here. It is really small, but even so, I tested it on my goathack. You will need a client that shows raw output to see it in action though. :)

Thoughts, comments, suggestions?

avva, does this meet your scrutiny? :)

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded