+ {% if notification.notif_type == 'account_created' %}
+
Account Created
+ {% elif notification.notif_type == 'room_invite' %}
+
Room Invitation
+ {% elif notification.notif_type == 'room_invite_removed' %}
+
Room Invitation Removed
+ {% elif notification.notif_type == 'conversation_invite' %}
+ Conversation Invitation
+ {% elif notification.notif_type == 'conversation_invite_removed' %}
+ Conversation Invitation Removed
+ {% elif notification.notif_type == 'conversation_message' %}
+ New Message
+ {% else %}
+ {{ notification.notif_type|replace('_', ' ')|title }}
{% endif %}
-
- {% elif notification.notif_type == 'conversation_invite' %}
-
- Conversation Invitation
- {% if notification.sender %}
- {{ notification.sender.username }} invited you to a conversation
- {% endif %}
-
- {% elif notification.notif_type == 'conversation_message' %}
-
- New Message
-
-
- {% if notification.sender %}
- {{ notification.sender.username }} sent a message in "{{ notification.details.conversation_name }}"
- {% endif %}
-
- {% else %}
-
- {{ notification.notif_type|replace('_', ' ')|title }}
-
-
- {% if notification.details and notification.details.message %}
+ {% if notification.notif_type == 'account_created' %}
+ Welcome to DocuPulse! Your account has been created successfully.
+ {% elif notification.notif_type == 'room_invite' and notification.sender and notification.details %}
+ {{ notification.sender.username }} {{ notification.sender.last_name }} invited you to join room "{{ notification.details.room_name }}"
+ {% elif notification.notif_type == 'room_invite_removed' and notification.sender and notification.details %}
+ {{ notification.sender.username }} {{ notification.sender.last_name }} removed your invitation to room "{{ notification.details.room_name }}"
+ {% elif notification.notif_type == 'conversation_invite' and notification.sender and notification.details %}
+ {{ notification.sender.username }} {{ notification.sender.last_name }} invited you to conversation "{{ notification.details.conversation_name }}"
+ {% elif notification.notif_type == 'conversation_invite_removed' and notification.sender and notification.details %}
+ {{ notification.sender.username }} {{ notification.sender.last_name }} removed your invitation to conversation "{{ notification.details.conversation_name }}"
+ {% elif notification.notif_type == 'conversation_message' and notification.sender and notification.details %}
+ {{ notification.sender.username }} {{ notification.sender.last_name }} sent a message in conversation "{{ notification.details.conversation_name }}"
+ {% elif notification.details and notification.details.message %}
{{ notification.details.message }}
{% endif %}
- {% endif %}
-
-
- {{ notification.timestamp.strftime('%Y-%m-%d %H:%M') }}
-
+
+
+ {{ notification.timestamp.strftime('%Y-%m-%d %H:%M') }}
+
+
+
+ {% if notification.notif_type in ['room_invite', 'room_invite_removed'] and notification.details and notification.details.room_id %}
+
+ {% elif notification.notif_type in ['conversation_invite', 'conversation_invite_removed', 'conversation_message'] and notification.details and notification.details.conversation_id %}
+