frdmn / rocketchat-export-channel-messages

Simple Node CLI tool to export all messages of a given Rocket.Chat channel or private group.
MIT License
16 stars 4 forks source link

Export of a Channel doesn't work #5

Open berardin opened 3 years ago

berardin commented 3 years ago

Hello,

first of all thanks for the tool!

I was trying to export a group from Rocket.Chat but I get an exeption:

`Trying to figure out room type of "#"... /opt/rocketchat-export-channel-messages/index.js:152 console.log('Looks like a ' + result.type.replace(/s$/, '') + '. Searching for messages ...'); ^

TypeError: Cannot read property 'replace' of undefined at /opt/rocketchat-export-channel-messages/index.js:152:51 at /opt/rocketchat-export-channel-messages/index.js:44:28 at Request._callback (/opt/rocketchat-export-channel-messages/node_modules/rocketchat/lib/net.js:147:39) at Request.self.callback (/opt/rocketchat-export-channel-messages/node_modules/request/request.js:185:22) at Request.emit (events.js:314:20) at Request. (/opt/rocketchat-export-channel-messages/node_modules/request/request.js:1154:10) at Request.emit (events.js:314:20) at IncomingMessage. (/opt/rocketchat-export-channel-messages/node_modules/request/request.js:1076:12)`

It looks like the result is undefined, cause it get a "false" even if I tried with an API client and I can get the Info of the Room.

There is something which I do wrong?

Thanks, Nico

Napsty commented 1 year ago

+1, same error here. Rocket.Chat 5.4.2

$ node --version
v11.15.0

$ npm --version
7.24.2