Ejemplo n.º 1
0
 def create_follow_request_notification(cls, follow_request_id, owner_id):
     follow_request_notification = cls.objects.create(
         follow_request_id=follow_request_id)
     Notification.create_notification(
         type=Notification.FOLLOW_REQUEST,
         content_object=follow_request_notification,
         owner_id=owner_id)
     return follow_request_notification
Ejemplo n.º 2
0
 def create_post_comment_notification(cls, post_comment_id, owner_id):
     post_comment_notification = cls.objects.create(
         post_comment_id=post_comment_id)
     Notification.create_notification(
         type=Notification.POST_COMMENT,
         content_object=post_comment_notification,
         owner_id=owner_id)
     return post_comment_notification
 def create_post_reaction_notification(cls, post_reaction_id, owner_id):
     post_reaction_notification = cls.objects.create(
         post_reaction_id=post_reaction_id)
     Notification.create_notification(
         type=Notification.POST_REACTION,
         content_object=post_reaction_notification,
         owner_id=owner_id)
     return post_reaction_notification
Ejemplo n.º 4
0
 def create_community_invite_notification(cls, community_invite_id,
                                          owner_id):
     community_invite_notification = cls.objects.create(
         community_invite_id=community_invite_id)
     Notification.create_notification(
         type=Notification.COMMUNITY_INVITE,
         content_object=community_invite_notification,
         owner_id=owner_id)
     return community_invite_notification
 def create_connection_request_notification(cls, connection_requester_id,
                                            owner_id):
     connection_request_notification = cls.objects.create(
         connection_requester_id=connection_requester_id)
     Notification.create_notification(
         type=Notification.CONNECTION_REQUEST,
         content_object=connection_request_notification,
         owner_id=owner_id)
     return connection_request_notification
 def create_post_user_mention_notification(cls, post_user_mention_id,
                                           owner_id):
     post_user_mention_notification = cls.objects.create(
         post_user_mention_id=post_user_mention_id)
     Notification.create_notification(
         type=Notification.POST_USER_MENTION,
         content_object=post_user_mention_notification,
         owner_id=owner_id)
     return post_user_mention_notification
 def create_connection_confirmed_notification(cls,
                                              connection_confirmator_id,
                                              owner_id):
     connection_confirmed_notification = cls.objects.create(
         connection_confirmator_id=connection_confirmator_id)
     Notification.create_notification(
         type=Notification.CONNECTION_CONFIRMED,
         content_object=connection_confirmed_notification,
         owner_id=owner_id)
     return connection_confirmed_notification
Ejemplo n.º 8
0
 def create_community_new_post_notification(
         cls, community_notifications_subscription_id, post_id, owner_id):
     community_new_post_notification = cls.objects.create(
         post_id=post_id,
         community_notifications_subscription_id=
         community_notifications_subscription_id)
     Notification.create_notification(
         type=Notification.COMMUNITY_NEW_POST,
         content_object=community_new_post_notification,
         owner_id=owner_id)
     return community_new_post_notification
Ejemplo n.º 9
0
 def create_user_new_post_notification(cls,
                                       user_notifications_subscription_id,
                                       post_id, owner_id):
     user_new_post_notification = cls.objects.create(
         post_id=post_id,
         user_notifications_subscription_id=
         user_notifications_subscription_id)
     Notification.create_notification(
         type=Notification.USER_NEW_POST,
         content_object=user_new_post_notification,
         owner_id=owner_id)
     return user_new_post_notification