Hello guys i have registerd UDF (Nodejs client), but when i apply that UDF stream is always null
asclient.client.udfRegister('./lua/lm.lua', function (error) {
if (error) {
console.error('Error: %s [%d]', error.message, error.code)
}
});
Above is my udf registration and when i aql > show modules i see its loaded. After that i try to apply this
var key = new Key(‘chat’, ‘conversations’, 1); var udf = { module: ‘lm’, funcname: ‘getlm’, args: [ctoken]}
asclient.client.apply(key, udf, function (error, result) {
if (error) throw error
console.log(result);
})
But always return null Here is my lua file content
function getlm(stream, conversation)
return stream
end
I just return the strem to check if there is some data, but is empty… Hope that info helps.