Skip to content

Conversation

@mrose17
Copy link

@mrose17 mrose17 commented May 15, 2014

otherwise when require'd, the caller can not make more than one Instapush object...

mrose17 added 2 commits May 15, 2014 10:08
otherwise when require'd, the caller can not make more than one
Instapush object
@mrose17
Copy link
Author

mrose17 commented Jul 22, 2014

ping!

@mjpearson
Copy link

+1 this breaks for multi-user setups. The require subsystem caches the 'new Instapush()' singleton.

Until this change is merged/managed, have to hijack the prototype for a new instance, messy and can't anticipate any release changes :

var InstapushClient = function() {
  this.version = 'v1'; 
  this.url = 'api.instapush.im';
}

InstapushClient.prototype = require('instapush').__proto__;

var ipc = new InstapushClient();

@hybridknight
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants