mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-27 09:04:54 +00:00
article api changes
This commit is contained in:
@ -51,7 +51,6 @@ def get_basic_detail(notification_type, from_user_id, to_user_id):
|
||||
def send_notification(notification_type, from_user_id, to_user_id, extra_data):
|
||||
""" used to send the push for the given notification type """
|
||||
(notification_data, from_user, to_user) = get_basic_detail(notification_type, from_user_id, to_user_id)
|
||||
print(notification_data, to_user)
|
||||
user_notification_type = UserNotification.objects.filter(user=to_user).first()
|
||||
# data = notification_data.data
|
||||
data = notification_data
|
||||
@ -64,7 +63,6 @@ def send_notification(notification_type, from_user_id, to_user_id, extra_data):
|
||||
|
||||
def send_push(user, data):
|
||||
""" used to send push notification to specific user """
|
||||
# if user.push_notification:
|
||||
notification_data = data.pop('data', None)
|
||||
user.fcmdevice_set.filter(active=True).send_message(
|
||||
Message(notification=FirebaseNotification(data['title'], data['body']), data=notification_data)
|
||||
|
||||
Reference in New Issue
Block a user