Allow /leave on a channel when disconnected (and use in /delete-view)

RESOLVED FIXED

Status

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: bugzilla-mozilla-20000923, Assigned: glenjamin+bmo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.85])

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
Currently, we don't allow /leave to be executed on a channel when there is no connected server. However, we track "joined" and "active" states for channels, so there is no reason not to allow this (and just set "joined" to false).

In particular, /delete-view should be updated to call /leave when a channel is "joined" - even if it isn't "active". Otherwise, if a user deletes a channel view while disconnected, we'll rejoin them when reconnected.
(Assignee)

Comment 1

10 years ago
Created attachment 381978 [details] [diff] [review]
allow leaving channels when offline

Delete view calls part if joined
cmdLeave sets joined=false if not active

Patch also strips some trailing whitespace from other places, fight the lint count!
Assignee: rginda → glenjamin+bmo
Attachment #381978 - Flags: review?(silver)
(Reporter)

Updated

10 years ago
Attachment #381978 - Flags: review?(silver) → review+
(Reporter)

Comment 2

10 years ago
Comment on attachment 381978 [details] [diff] [review]
allow leaving channels when offline

(e.view.active || e.view.joined) should be just e.view.joined; a channel cannot be active without also being joined.

r=silver otherwise.
(Reporter)

Updated

10 years ago
Status: NEW → ASSIGNED
(Reporter)

Comment 3

10 years ago
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.85]
You need to log in before you can comment on or make changes to this bug.