Closed (fixed)
Project:
Node.js integration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2012 at 09:18 UTC
Updated:
20 Jun 2014 at 00:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedi'm not sure i like this approach.
i just looked at the node.js module, and i notice that there's no drupal_alter() for content channel messages. so, i've fixed that with this commit:
http://drupalcode.org/project/nodejs.git/commit/075db67
this should allow you to alter chatroom messages, and set the callback to your code. hopefully this gives you what you need for now.
i'm not totally opposed to adding a js-side 'hook' system that would fire after messages hit the browser, but i think it would need to look more like the system the node.js module uses to allow modules to register functionality.
Comment #2
Anonymous (not verified) commentedsetting to needs work, which is the usual status for things that need further discussion.
also, when you submit a patch, please set the status to needs review.
Comment #3
Alexander_Gurov commentedThank you for recomendations
I'm agreed with your opininon about js-side 'hook' system - it will be great to have it on node.js and do not create hook system for each module. For now node.js allows to put only one callback to message. I'll try to write a patch for node.js module that will allow to attach several callback functions to one message without loosing previous functionality. Also callbacks should be ordered on server side. What do you think about that idea?
Comment #4
Anonymous (not verified) commentedyes, adding the ability to specify several callbacks works for me, moving this issue to the node.js queue.
i think the only change necessary would be to make nodejs.js check if callback was a list or a string, and iterate if its a list.
Comment #5
Anonymous (not verified) commentedupdating title.
Comment #6
Alexander_Gurov commentedPlease review that small patch for node.js script
Comment #7
Anonymous (not verified) commentedthanks! committed a modified version here:
http://drupalcode.org/project/nodejs.git/commit/cce53fb