Rantanen / node-mumble

Mumble client in Node.js
MIT License
155 stars 48 forks source link

user.inputStream() fails with TypeError: cannot set whisperId of undefined #110

Open ppacher opened 5 years ago

ppacher commented 5 years ago

Hi,

I just found a bug when using inputStream() on a user object.

MumbleClient.inputStreamForUser requires the session ID as well as streaming options, however, User.inputStream() only passes the session ID which causes a TypeError when setting the whisperId on the undefined options object.

See https://github.com/Rantanen/node-mumble/blob/master/lib/MumbleClient.js#L293 and https://github.com/Rantanen/node-mumble/blob/master/lib/User.js#L118 .

Btw, the typescript bindings are outdated. I'd be fine to provide updated ones or try to integrate TS definitions from JSDocs.

Cheers, Patrick

ppacher commented 5 years ago

Thats basically what @stanix fixed in https://github.com/stanix/node-mumble/commit/0965ae774594ab47658ba4d37cf131c7eafaf144 If you're fine with it, I'll create a pull requests fixing this one as well as another one fixing the typescript definitions.

Rantanen commented 5 years ago

Oh; Sure. That sounds great!

If you can get the typescript stuff to follow the JSDocs, that would be best. I haven't had any exposure to TypeScript so I don't really know the details of those bindings. As long as they need to be kept up to date manually I'm afraid they will become outdated whenever there are changes to the APIs.