kissrobber / xmpp4r_facebook

facebook chat(xmpp). X-FACEBOOK-PLATFORM SASL for ruby xmpp4r
31 stars 15 forks source link

sending messages from delayed jobs get stuck #2

Open kruzel opened 12 years ago

kruzel commented 12 years ago

sending messages from delayed jobs get stuck. OS - windows 7 Rails - 3.1

code: sender_chat_id = "-#{@owner.uid}@chat.facebook.com" receiver_chat_id = "-#{@user.uid}@chat.facebook.com" message_body = "Hey " << @user.full_name message_subject = @owner.uid << "invites you to ...."

  jabber_message = Jabber::Message.new(receiver_chat_id, message_body)
  jabber_message.subject = message_subject

  client = Jabber::Client.new(Jabber::JID.new(sender_chat_id))
  client.connect
  client.auth_sasl(Jabber::SASL::XFacebookPlatform.new(client,
    BetchaServer::Application::config.app_id, @owner.access_token,
    BetchaServer::Application::config.app_secret), nil)
  client.send(jabber_message)
  client.close
kruzel commented 11 years ago

any news on this one? Ofer