fix
This commit is contained in:
@@ -11,10 +11,7 @@ EXPO_API_URL = "https://exp.host/--/api/v2/push/send"
|
||||
def send_notification(token, title, body, data=None):
|
||||
tokens = list(Notification.objects.exclude(token=token).values_list("token", flat=True))
|
||||
users = list(Notification.objects.exclude(token=token).values_list("user", flat=True))
|
||||
user_ids = []
|
||||
for user in users:
|
||||
user_ids.append(user)
|
||||
create_history.delay(user_ids, title, body, data)
|
||||
create_history.delay(users, title, body, data)
|
||||
if not tokens:
|
||||
return {"error": "No tokens found"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user