amitsolanki24_'s avatar

*Share post via direct message in chats using Firebase

Hey, I'm using relatime firebase as a chatting app in laravel application.

I want to share post-links in chats Here is my code

chatRef.push({
  share_post: {
    link: post_link,
    image: post_image,
    author: post_author
  },
  sender_id: sender_user_id,
  receiver_id: receiver_user_id,
  msg: message,
  timestamp: new Date().getTime()
});

My question is that if post author delete post then

 1. How can I show post delete msg in chats or
 2. How can i delete that msg from chats.

And let's say user A shared a post with user B, who does not follow the post author. In chats, how can I show the phrase 'you need to follow*** in order to read shared posts'?

0 likes
0 replies

Please or to participate in this conversation.