Using APE 1.1.1 binary build x86

Im working in a server module and getUserByPubid always returns a pipe=0
Im 300% sure im using a valid 'pubid'

Matter fact any pipe i try to get is pipe=0 even with getUserByPubid
Here is a snippet

Ape.registerCmd("pushpub", false, function(params, info) {
 if (params.password == Ape.config("inlinepush.conf", "password")) {
 if ($defined(params.channel) && $defined(params.raw) && 
$defined(params.data)) {
var chan = Ape.getChannelByName(params.channel);
Ape.log(chan.pipe);
if (!$defined(chan)) return ["401", "UNKNOWN_CHANNEL"];
 Ape.log(params.pubid);
 var user = Ape.getUserByPubid(params.pubid);
Ape.log(user.username);
if (!$defined(user) || !user) return ["401", "UNKNOWN_USER"];
 chan.pipe.sendRaw(params.raw, params.data, {"from": user});
 return {"name":"pushed","data":{"value":"ok"}};
} else {
return 0;
}
} else {
return ["400", "BAD_PASSWORD"];
}

})

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to