File tree 3 files changed +9
-8
lines changed
3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -100,15 +100,16 @@ window.Kandan =
100
100
template = JST[' current_user' ]
101
101
currentUser = Kandan .Helpers .Users .currentUser ()
102
102
$ (" .header .user" ).html template ({
103
- gravatar_hash : currentUser .gravatar_hash ,
103
+ gravatarHash : currentUser .gravatar_hash ,
104
104
name : " #{ currentUser .first_name } #{ currentUser .last_name } "
105
105
})
106
106
107
107
init : ->
108
108
@ setCurrentUser ()
109
109
channels = new Kandan.Collections.Channels ()
110
- channels .fetch ({success : (channelsCollection )=>
111
- @ initBroadcasterAndSubscribe ()
112
- activeUsers = new Kandan.Collections.ActiveUsers ()
113
- activeUsers .fetch ({success : @ onFetchActiveUsers (channelsCollection)})
110
+ channels .fetch ({
111
+ success : (channelsCollection )=>
112
+ @ initBroadcasterAndSubscribe ()
113
+ activeUsers = new Kandan.Collections.ActiveUsers ()
114
+ activeUsers .fetch ({success : @ onFetchActiveUsers (channelsCollection)})
114
115
})
Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ class Kandan.Plugins.Pastie
16
16
originalLength = content .length
17
17
content = content .split (" /n" ).slice (0 , @options .maxPreviewLines ) if content .split (" \n " ) > @options .maxPreviewLines
18
18
content = content .substring (0 , @options .maxPreviewLength ) if content .length > @options .maxPreviewLines
19
- return " #{ content} ..." if content .length = = originalLength
19
+ return " #{ content} ..." if content .length ! = originalLength
20
20
content
21
21
22
22
23
23
@ init: ->
24
24
Kandan .Modifiers .register @options .regex , (message , state ) =>
25
25
url = " /channels/#{ message .channel_id } /activities/#{ message .id } "
26
- message .content = @options .template ({preview : (message .content ), messageLink : url})
26
+ message .content = @options .template ({preview : @ truncate (message .content ), messageLink : url})
27
27
return Kandan .Helpers .Activities .build_from_message_template (message)
28
28
29
29
# Kandan.Plugins.register "Kandan.Plugins.Pastie"
Original file line number Diff line number Diff line change 1
- <img src="http://gravatar.com/avatar/<%= @gravatar_hash %>?s=25&d=http://bushi.do/images/profile.png"/>
1
+ <img src="http://gravatar.com/avatar/<%= @gravatarHash %>?s=25&d=http://bushi.do/images/profile.png"/>
2
2
<span><%= @name %></span>
You can’t perform that action at this time.
0 commit comments