GithubHelp home page GithubHelp logo

Comments (7)

mloughran avatar mloughran commented on August 22, 2024

Can you include some code that doesn't work? Make sure you're using member.id & member.info rather than the old member.user_id etc - that could be the issue. As an example see http://pusher-presence-demo.heroku.com/

from pusher-js.

nickelser avatar nickelser commented on August 22, 2024

I'm doing something that boils down to (transcribing from coffeescript):

new Pusher(foo).subscribe(bar).bind('pusher:member_added', this.some_fn)

function some_fn(member) {
  console.log("member:", member);
}

and member is null.

edit: the handler is actually in a closure binding it to the instance of the class, but I don't know why that would null member? The pusher debugging output has 'null' being passed to member_added (not my debug output)

from pusher-js.

mloughran avatar mloughran commented on August 22, 2024

Nick, sorry for not getting back to you on this one. That code looks fine so I'm not sure what's going on. All I can say is that this seems to work for other people - is coffeescript doing something weird?

from pusher-js.

nickelser avatar nickelser commented on August 22, 2024

No problem, I'll try to reduce it down to a test case and get the compiled coffeescript. I agree it looks like it should work...

from pusher-js.

mloughran avatar mloughran commented on August 22, 2024

Hi Nick - did you ever get this to work? Can I close this issue?

from pusher-js.

mloughran avatar mloughran commented on August 22, 2024

I believe this issue happens if user_info is not provided for a presence user. This should be fixed, but in the meantime, just add user_info (which you should do anyway :)

from pusher-js.

nickelser avatar nickelser commented on August 22, 2024

gosh sorry for the late response, it looks like that works fine :)

from pusher-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.