Yep, correct, p in your example is an user "email", so modifying your  
Notify function to take an extra parameter and pass p would do it.

The properties object for a WAVELET_PARTICIPANTS_CHANGED event looks  
like this in Python:

{u'blipId': u'b+FkFz5bg3D', u'participantsRemoved': [],  
u'participantsAdded': [usern...@example.com']}

[]s
Fabricio


On Nov 2, 2009, at 5:40 PM, Gobba wrote:

>
> Ive built the greeting bot from the tutorial in python. But i cant
> figure out the properties. Like how would i do if i wanted to reply a
> "hi (joining user)" instead of "hi everyone" ?
>
> this is the code:
>
> from waveapi import events
> from waveapi import model
> from waveapi import robot
>
> def OnParticipantsChanged(properties, context):
>
>        added= properties['participantsAdded']
>        for p in added:
>                Notify(context)
>
> def OnRobotAdded(properties, context):
>        root_wavelet = context.GetRootWavelet()
>        root_wavelet.CreateBlip().GetDocument().SetText("Im alive!")
>
> def Notify(context):
>        root_wavelet = context.GetRootWavelet()
>        root_wavelet.CreateBlip().GetDocument().SetText("Hi
> Everybody!")
>
> if __name__ == '__main__':
>        myRobot = robot.Robot('textilizer', image_url='http://
> textilizer.appspot.com/assets/icon.png', version='1.1',
> profile_url='http://textilizer.appspot⺠      myRobot.RegisterHandler
> (events.WAVELET_PARTICIPANTS_CHANGED, OnParticipantsChanged)
>        myRobot.RegisterHandler(events.WAVELET_SELF_ADDED,
> OnRobotAdded)
>        myRobot.Run()
>
>
>
> i think the attribute is in in p ? correct?
>
> plz help
> -gob
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to google-wave-api@googlegroups.com
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to