From ae52804a086667e8ab0aed18ac00b0d3567284de Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sun, 4 Jun 2017 05:48:38 +0000 Subject: [PATCH] Add discordio support in embed endpoint --- webapp/titanembeds/blueprints/embed/embed.py | 3 ++- webapp/titanembeds/templates/embed.html.j2 | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webapp/titanembeds/blueprints/embed/embed.py b/webapp/titanembeds/blueprints/embed/embed.py index 9b68511..8d3f2dd 100644 --- a/webapp/titanembeds/blueprints/embed/embed.py +++ b/webapp/titanembeds/blueprints/embed/embed.py @@ -34,7 +34,8 @@ def guild_embed(guild_id): "id": guild.guild_id, "name": guild.name, "unauth_users": guild.unauth_users, - "icon": guild.icon + "icon": guild.icon, + "discordio": guild.discordio, } return render_template("embed.html.j2", login_greeting=get_logingreeting(), diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index 8b5f01d..535e2e0 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -42,7 +42,7 @@ {% if guild['icon'] %} {% endif %} - {{ guild['name'] }} + {{ guild['name']|e }} @@ -82,8 +82,12 @@ {% if guild['icon'] %} {% endif %} - + + {% if guild["discordio"] %} + discord.io/{{ guild["discordio"]|e }} + {% else %} discord.gg + {% endif %}

Please choose one of the following methods to authenticate!