Skip to content

Commit

Permalink
feat: consider roons without message in the 24h validation
Browse files Browse the repository at this point in the history
  • Loading branch information
helllllllder committed Jan 30, 2024
1 parent dff1741 commit 191a9b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chats/apps/rooms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def is_24h_valid(self) -> bool:
created_on__gte=timezone.now() - timedelta(days=1),
contact=self.contact,
)
return day_validation.exists()
if not day_validation.exists():
return self.created_on > timezone.now() - timedelta(days=1)
return True

@property
def serialized_ws_data(self):
Expand Down

0 comments on commit 191a9b3

Please sign in to comment.