Skip to content

Bug Report: Livechat: New room created when send message to a closed room via LiveChat API #13733

@rsmartins78

Description

@rsmartins78

Description:

Livechat: New room created when send message to a closed room via LiveChat API

Steps to reproduce:

Create a new visitor:

curl -X POST -d '{ "visitor": { "name": "myname", "token": "mytoken" }}' 'http://rocketchat:3000/api/v1/livechat/visitor'

Get a new room id

curl -X GET 'http://rocketchat:3000/api/v1/livechat/room?token=mytoken'

Send messages to this new room

curl -X POST -d '{ "token": "mytoken", "rid": "myroom", "msg": "Hello" }' 'http://rocketchat:3000/api/v1/livechat/message'

Close room (via Web Interface or API)

Send repeatdly times a new message to closed room.

Expected behavior:

Response with error or preferably reopen the closed room. If there are both options, it is best to choose via parameter.

Actual behavior:

It creates a new room every sent message.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.74.3
  • Operating System: CentOS 7
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Deactivated
  • NodeJS Version: v8.11.4
  • MongoDB Version: db version v4.0.4

Additional context

I'm developing an integration between Telegram and Rocketchat using a platform in the middle.
This bug occurs when I send curl to room's endpoint with predefined token and rid parameters, with a closed room. Creates a new emtpy room.

Relevant logs:

No errors in log.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions