English 中文(简体)
How does a Robot respond privately to you in Google Wave?
原标题:

Google Wave allows two or more participants to speak privately within a wave. When my robot is added to the wave, I recognize the WAVELET_SELF_ADDED event and call the method below. However, nothing happens.

I can tell that the code is executed because of the Debug and Info statements in the logs. Is there any reason why the robot does not start a private blip when it s added?

def start_private_wavelet(properties, context):
    """Start a private conversation between the robot and some participants."""
    participants = []
    participants.append( my-username@googlewave.com )
    participants.append( my-robot@appspot.com )

    logging.debug( Getting wave info )

    root_wavelet = context.GetRootWavelet()
    root_wave_id = root_wavelet.GetWaveId()
    root_wave = context.GetWaveById(root_wave_id)

    logging.debug( Creating private wave in %s  % root_wave_id)

    private_wavelet = root_wave.CreateWavelet(participants)
    message = private_wavelet.CreateBlip()
    message.GetDocument().SetText("This is a private conversation...")

    logging.debug( Private wave created )
最佳回答

A private conversion is created through a Wavelet.

So, using the Python API, I think you re looking for OpBasedWave.CreateWavelet.

participants = []
participants.append( other-user@googlewave.com )
participants.append( self-robot@appspot.com ) # Remember to add your robot!

private_wavelet = root_wave.CreateWavelet(participants)
message = private_wavelet.CreateBlip()
message.GetDocument().SetText("Hi there, this is just a secret!")
问题回答

暂无回答




相关问题
Browsing activities outside the visited website

Is there a way a Web site can learn something about your browsing activities outside of this Web site from an HTTP request sent to the Web site by your browser?

How to store private pictures and videos in Ruby on Rails

Here s a story: User A should be able to upload an image. User A should be able to set a privacy. ("Public" or "Private"). User B should not be able to access "Private" images of User A. I m ...

Application passwords and SQLite security

I have been searching on google for information regarding application passwords and SQLite security for some time, and nothing that I have found has really answered my questions. Here is what I am ...

Open Source Identity vs. Real Life Identity

I maintain 2 identities one for open source development - which doesn t really contain any personal information. I also have another identity obviously - my real one. This may be community wiki - but ...

How does a Robot respond privately to you in Google Wave?

Google Wave allows two or more participants to speak privately within a wave. When my robot is added to the wave, I recognize the WAVELET_SELF_ADDED event and call the method below. However, nothing ...

How Big a Security Risk are Browser Extensions?

One of the more powerful features of modern day browsers is the ability for software developers to write browser extensions to enhance, modify and tweak the pages visited by the user. As more of our ...

热门标签