pubnub / pubnub-angular

Official PubNub AngularJS SDK
Other
84 stars 43 forks source link

There is no callback on ngPublish #8

Closed madhur closed 9 years ago

madhur commented 9 years ago

There is no callback on ngPublish method.

How can I get the confirmation that my message has been successfully delivered.

stephenlb commented 9 years ago

Callback Publish Sent

Have you tried adding the callback param into ngPublish method?

$scope.publish = function() {
  PubNub.ngPublish({
    callback : function(info) { console.log(info) },
    channel  : $scope.selectedChannel,
    message  : $scope.newMessage
  });
};
madhur commented 9 years ago

Thanks. It would be good to add this to official documentation.

On Wed, Dec 3, 2014 at 11:03 AM, Stephen L. Blum notifications@github.com wrote:

Callback Publish Sent

$scope.publish = function() { PubNub.ngPublish({ callback: function(info) { console.log(info) }, channel: $scope.selectedChannel, message: $scope.newMessage }); };

— Reply to this email directly or view it on GitHub https://github.com/pubnub/pubnub-angular/issues/8#issuecomment-65358339.

Madhur +91 9999 55 9848

CIN No. U72900CH2009PTC031912

stephenlb commented 9 years ago

:+1: