Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
a059b05a
Commit
a059b05a
authored
9 years ago
by
Matthias Brun
Browse files
Options
Downloads
Patches
Plain Diff
Only call archive/unarchive if necessary
parent
e33521f9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/rocketchat-channel-settings/client/views/channelSettings.coffee
+8
-6
8 additions, 6 deletions
...chat-channel-settings/client/views/channelSettings.coffee
with
8 additions
and
6 deletions
packages/rocketchat-channel-settings/client/views/channelSettings.coffee
+
8
−
6
View file @
a059b05a
...
...
@@ -100,11 +100,13 @@ Template.channelSettings.onCreated ->
toastr
.
success
TAPi18n
.
__
'Room_type_changed_successfully'
when
'archivationState'
if
@
$
(
'input[name=archivationState]:checked'
).
val
()
is
'true'
Meteor
.
call
'archiveRoom'
,
@
data
?
.
rid
,
(
err
,
results
)
->
return
toastr
.
error
err
.
reason
if
err
toastr
.
success
TAPi18n
.
__
'Room_archived'
if
ChatRoom
.
findOne
(
@
data
.
rid
)
?
.
archived
isnt
true
Meteor
.
call
'archiveRoom'
,
@
data
?
.
rid
,
(
err
,
results
)
->
return
toastr
.
error
err
.
reason
if
err
toastr
.
success
TAPi18n
.
__
'Room_archived'
else
Meteor
.
call
'unarchiveRoom'
,
@
data
?
.
rid
,
(
err
,
results
)
->
return
toastr
.
error
err
.
reason
if
err
toastr
.
success
TAPi18n
.
__
'Room_unarchived'
if
ChatRoom
.
findOne
(
@
data
.
rid
)
?
.
archived
is
true
Meteor
.
call
'unarchiveRoom'
,
@
data
?
.
rid
,
(
err
,
results
)
->
return
toastr
.
error
err
.
reason
if
err
toastr
.
success
TAPi18n
.
__
'Room_unarchived'
@
editing
.
set
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment