Update app.py
Browse files
app.py
CHANGED
|
@@ -1708,8 +1708,11 @@ def chat():
|
|
| 1708 |
{% endif %}
|
| 1709 |
{% endif %}
|
| 1710 |
{% if 'post_id' in message %}
|
| 1711 |
-
{%
|
| 1712 |
-
|
|
|
|
|
|
|
|
|
|
| 1713 |
{% endif %}
|
| 1714 |
</div>
|
| 1715 |
{% endfor %}
|
|
|
|
| 1708 |
{% endif %}
|
| 1709 |
{% endif %}
|
| 1710 |
{% if 'post_id' in message %}
|
| 1711 |
+
{% with post = posts|selectattr('id', 'equalto', message['post_id'])|first %}
|
| 1712 |
+
{% if post %}
|
| 1713 |
+
<p>Shared post: <a href="{{ url_for('post_page', post_id=message['post_id']) }}">{{ post['title'] }}</a></p>
|
| 1714 |
+
{% endif %}
|
| 1715 |
+
{% endwith %}
|
| 1716 |
{% endif %}
|
| 1717 |
</div>
|
| 1718 |
{% endfor %}
|