Skip to content

Client with copied pad receives a "pad deleted" message #3183

@lpagliari

Description

@lpagliari

How to reproduce:

  • open a browser with a pad
  • call the api to copy the pad
  • result: a message is displayed on the browser saying the pad was removed

Code that makes this happen:

Pad.prototype.copy = function copy(destinationID, force, callback) {
(...)
  //kick everyone from this pad
  // TODO: this presents a message on the client saying that the pad was 'deleted'. Fix this?
  padMessageHandler.kickSessionsFromPad(sourceID);

Does anybody know if there was a reason for Pad.prototype.copy to call kickSessionsFromPad? It does not make sense to me at all. I suspect that Pad.prototype.copy code was based on Pad.prototype.remove, and in this case it makes total sense to tell clients the pad is no longer available. But for copy...

I'll implement a fix for this, unless someone gives a good reason to kick everyone from the copied pad.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions