Hi Guys,
I am new to Google Wave. I am trying to edit the sample bot given by Google
and trying to learn the Robots API.

It seems like wavelet_blip_created is not getting triggered in my robot.
I am adding it to capabilities.xml and also changing the version number.

<?xml version="1.0" encoding="utf-8"?>
<w:robot xmlns:w="http://wave.google.com/extensions/robots/1.0";>
  <w:capabilities>
    <w:capability name="WAVELET_PARTICIPANTS_CHANGED" content="true" />
    <w:capability name="WAVELET_BLIP_CREATED" content="true" />
    <w:capability name="DOCUMENT_CHANGED" content="true" />
    <w:capability name="BLIP_SUBMITTED" content="true" />
  </w:capabilities>
  <w:version>3</w:version>
</w:robot>

My sample robot just adds a blip whenever wavelet_blip_created or
blip_submitted events occur.

public class SampServlet extends AbstractRobotServlet
{
static final Logger log = Logger.getLogger(ChattyServlet.class.getName()) ;
 @Override
public void processEvents(RobotMessageBundle bundle)
{
 Wavelet wavelet = bundle.getWavelet();
String waveid = wavelet.getWaveId() ;
 String waveletid = wavelet.getWaveletId() ;
 if (bundle.wasSelfAdded()) {
 Blip blip = wavelet.appendBlip();
TextView textView = blip.getDocument();
 textView.append("I'm alive!");
}

for (Event e: bundle.getEvents())
 {
if(e.getType() != EventType.DOCUMENT_CHANGED)
{
 log.warning("Waveid: " + waveid + " Waveletid: " + waveletid ) ;
}
 if(e.getType() == EventType.WAVELET_BLIP_CREATED)
{
wavelet.appendBlip().getDocument().append("wavelet_blip_created");
 }
else if(e.getType() == EventType.BLIP_SUBMITTED)
{
 wavelet.appendBlip().getDocument().append("blip_submitted");
}
 }
}
}

My understanding of wavelet_blip_created is that it will be triggered as
soon as some one clicks the 'Reply to this message' option or 'Insert your
reply' or 'Continue this thread' and a new blip is created.

But i don't see any blips getting appended whenever I do any of the above.
I see the 'blip_submitted' event getting triggered and a new blip getting
appended whenever I hit the 'Done' button.

Why is my 'wavelet_blip_created' not getting triggered?
Is my understanding of the event wrong or am I missing something?

Thanks,
Elan.

--

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-...@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