* @param id the participant id of the new user.
* @throws IOException if there is a problem submitting the new wave.
*/
public void greet(ParticipantId id) throws IOException {
Preconditions.checkNotNull(id);
RobotAccountData account = null;
String rpcUrl = getFrontEndAddress() + "/robot/rpc";
try {
account =
getAccountStore()
.getAccount(ParticipantId.ofUnsafe(getRobotId() + "@" + getWaveDomain())).asRobot();
} catch (PersistenceException e) {
LOG.log(Level.WARNING, "Cannot fetch account data for robot id: " + getRobotId(), e);
}
if (account != null) {
setupOAuth(account.getId().getAddress(), account.getConsumerSecret(), rpcUrl);
Wavelet newWelcomeWavelet = newWave(getWaveDomain(), Sets.newHashSet(id.getAddress()));
if (welcomeWaveId != null) {
Wavelet templateWelcomeWavelet =
fetchWavelet(welcomeWaveId, WaveletId.of(getWaveDomain(), "conv+root"), rpcUrl);
RobotsUtil.copyBlipContents(templateWelcomeWavelet.getRootBlip(),