0

I know how to send but i don't know how to recive and delete it.

    jid = Jabber::JID.new('user')
    client = Jabber::Client.new(jid)
    client.connect('54.187.67.96',5222)
    client.auth('password')
    client.send(Jabber::Presence.new.set_show(:chat).set_status('Rails!'))


    # Send an Instant Message.
    body = 'Hello from Rails'
    to_jid = Jabber::JID.new('user')
    message = Jabber::Message::new(to_jid, body).set_type(:normal).set_id('1')
    client.send(message)
Jigar Bhatt
  • 4,217
  • 2
  • 34
  • 42

1 Answers1

1

See stream.rb for the code you're running. add_message_callback looks like the winner to me. Deleting a message is not core Jabber so you need to talk it over with the server.

Nathaniel Waisbrot
  • 23,261
  • 7
  • 71
  • 99