bigbluebutton-Github/bigbluebutton-html5/app/client/views/sharedTemplates.coffee
2015-07-02 13:18:05 -07:00

19 lines
530 B
CoffeeScript
Executable File

Template.makeButton.helpers
hasGotUnreadMail: (userId) ->
console.log "I'm here"
chats = getInSession('chats') if getInSession('chats') isnt undefined
flag = false
if userId is "all_chats"
chats.map((tabs) ->
flag = true if tabs.gotMail is true
tabs
)
else if userId is "PUBLIC_CHAT"
chats.map((tabs) ->
flag = true if tabs.userId is userId and tabs.gotMail is true
tabs
)
if flag
return "gotUnreadMail"
else
return ""