From b791853562cf6feaa15a204dd71b136aacc388ef Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 9 Apr 2017 17:07:58 -0700 Subject: [PATCH] Fix mention event handelers --- titanembeds/static/js/embed.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/titanembeds/static/js/embed.js b/titanembeds/static/js/embed.js index 98c4d74..8119254 100644 --- a/titanembeds/static/js/embed.js +++ b/titanembeds/static/js/embed.js @@ -171,8 +171,8 @@ function fill_discord_members(discordmembers) { var member = discordmembers[i]; var rendered = Mustache.render(template, {"id": member.id.toString() + "d", "username": member.username, "avatar": member.avatar_url}); $("#discord-members").append(rendered); - $( "#discorduser-" + member.id.toString() + "d").click(function() { - mention_member(member.id.toString()); + $( "#discorduser-" + member.id.toString() + "d").click({"member_id": member.id.toString()}, function(event) { + mention_member(event.data.member_id); }); } } @@ -185,8 +185,8 @@ function fill_authenticated_users(users) { var member = users[i]; var rendered = Mustache.render(template, {"id": member.id.toString() + "a", "username": member.username, "avatar": member.avatar_url}); $("#embed-discord-members").append(rendered); - $( "#discorduser-" + member.id.toString() + "a").click(function() { - mention_member(member.id.toString()); + $( "#discorduser-" + member.id.toString() + "a").click({"member_id": member.id.toString()}, function(event) { + mention_member(event.data.member_id); }); } }