Skip to content
Snippets Groups Projects
Commit 317ff6b7 authored by Gabriel Engel's avatar Gabriel Engel
Browse files

Merge pull request #2229 from chrisberthe/fix-toogle-typo

Modify all toogleFavorite method calls to toggleFavorite
parents b8c2a064 c61e3e63
No related merge requests found
Meteor.methods
toogleFavorite: (rid, f) ->
toggleFavorite: (rid, f) ->
if not Meteor.userId()
throw new Meteor.Error 203, t('User_logged_out')
......
......@@ -273,7 +273,7 @@ Template.room.events
'click .toggle-favorite': (event) ->
event.stopPropagation()
event.preventDefault()
Meteor.call 'toogleFavorite', @_id, !$('i', event.currentTarget).hasClass('favorite-room')
Meteor.call 'toggleFavorite', @_id, !$('i', event.currentTarget).hasClass('favorite-room')
'click .edit-room-title': (event) ->
event.preventDefault()
......
Meteor.methods
toogleFavorite: (rid, f) ->
toggleFavorite: (rid, f) ->
if not Meteor.userId()
throw new Meteor.Error('invalid-user', "[methods] toogleFavorite -> Invalid user")
throw new Meteor.Error('invalid-user', "[methods] toggleFavorite -> Invalid user")
RocketChat.models.Subscriptions.setFavoriteByRoomIdAndUserId rid, Meteor.userId(), f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment