Open Bug 524472 Opened 10 years ago Updated 5 years ago
Delayed /delete-view commands lose their context
When you leave or delete a channel or delete a connecting network, the actual /delete-view command is run delayed, when the leave goes through on the server or the cancel completes. In doing so, it loses the context ("e") that went with the original command. This affects CEIP logging of the command, as it gets source=script even when the original command was typed by the user or activated via a menu. We should store "e" (or at minimum e.source and e.isInteractive) when setting "deleteWhenDone" (I think we could actually just set deleteWhenDone=e instead of =true and the logic would still work) and use it for executing the delayed /delete-view.
One of my other ideas for this was an extra attribute on "e" (like e.sourceDetail) for custom tagging, but as this extension to bug 524470 is all about events (EventPump events) it occurs to me that there's another way. Instead of preserving "e" in these specific cases, just passing the local "e" in CIRCChannel.prototype.onPart and CIRCNetwork.prototype.onError to the dispatch() would give the CEIP logger enough information. It would just need to log e.set and e.type in the "source" attribute, e.g. as "set:type". In general we should be trying to pass the existing "e" anyway, although the event -> command boundary might have some issues in doing so generally.
Hindsight: dupe of bug 790341?
It's similar but a different case of some code triggering a command "later" and losing how it originally started, AFAIK ("Delayed" in the summery doesn't actually refer to /delayed).
You need to log in before you can comment on or make changes to this bug.