0
我试图使用PubNub的存在功能,并将接收到的信息作为普通消息进行转发。下面是我的订阅功能正常工作,以及我的here_now,不给我任何东西。我想我想知道的是他们如何以及为什么会有所不同。正确实施的指针也很有价值。存在,PubNub +红宝石
pubnub.here_now({
'channel' => @channel,
'callback' => lambda do |x|
## Relay Message
sendMessage(x)
return true
end
})
pubnub.subscribe({
'channel' => @channel,
'callback' => lambda do |message|
## Relay Message
sendMessage(message)
return true
end
})