Skip to content

Instantly share code, notes, and snippets.

@domagude
Last active November 28, 2017 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domagude/5f73d52bab3ab772be7a3ce60e1befd7 to your computer and use it in GitHub Desktop.
Save domagude/5f73d52bab3ab772be7a3ce60e1befd7 to your computer and use it in GitHub Desktop.
// if a user was added to a new group conversation
if (data['notification'] == 'added-to-group-conversation') {
subToGroupConversationChannel(data['conversation_id']);
$('#conversations-menu ul').prepend(data['link_to_conversation']);
calculateUnseenConversations();
if (gon.user_id == data['message_author']) {
$('#conversations-menu ul li a')[0].click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment