Skip to content

Cannot overwrite message callback #197

Open
@sticmac

Description

@sticmac

When using ColyseusRoom.OnMessage twice on the same message ID, I get the following exception:

ArgumentException: An item with the same key has already been added. Key: myMessage

An easy fix would be to modify the OnMessage method to take in consideration if a previous message with the given id already exists. However, I wanted to know if this is a bug or a real design choice before submitting a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions