Open Bug 930122 Opened 6 years ago Updated 6 years ago

Manually invoking the hide-view command with a channelname gives an error

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: svl-bmo, Assigned: rginda)

Details

/hide-view #bs gives:
[ERROR]	Internal error dispatching command “hide-view”.
[ERROR]	TypeError: invalid 'in' operand e.view @ <chrome://chatzilla/content/commands.js> 1542
Regular /hide-view when in a channel works.

Seen on chatzilla 0.9.90.1 on SeaMonkey 2.21

The hide-view command is listed as taking a "<view>" argument under /commands. (I haven't been able to figure out any possible "view" invocation which could be given to the command and would work.) It should either be hidden from there, or (preferably) :) made to work when manually invoked with a channelname.
Probably should use <channel-name> like /join and /invite, which should get automatic behaviour when on a channel view and no need to do anything fancy in the code.
Version: unspecified → Trunk
Whoops, forgot that /hide-view is for non-channel views too. I believe it is probably better to mark it internal (along with /delete-view if that isn't too). You can still execute internal commands but they don't tab-complete or appear in /commands.
(In reply to Sander from IRC)
> I'm trying to auto-perform hide some very low-traffic channels, so they'll pop up
> when there's conversation, but not take up space beforehand
> /eval dispatch("hide-view", {view: e.server.getChannel("#whatever")}) fires too early.
> Any work around for this error?

In the Channel's own autoperform I just add /delayed 9 hide
You need to log in before you can comment on or make changes to this bug.