Chat app problem

Hey there how to make a chat app which saves chat like whatsapp cause I was making a chat app with realtime DB But the Realtime DB Deletes the base after 30days i don’t why but can anyone help with this

This is second part after one day by typing same room name

It will only show last chat it will not show whole chats
I want that when we write same roomname it should show the whole chats while showing only last chat
Thunkable this is link
please veiw live in Thunkable app in Mobile because the app which i made will not work in PC and LAPTOP

1 Like

When you first create a project in Firebase, it will add a rule to the database to prevent access after 30 days. You can go to the Rules tab under Realtime DB and change the rule.

1 Like

wait sir i am just opening it

Sir this


??

1 Like

See this post and see my solution in it. Just do the same.

sir i saw your post like this i have to do


??
or like this

1 Like

This is actually up to you.

You can keep the old rule but change the number to the date you want like next year.

You can just write true to make it accessible to anyone.

You can make auth != null which means users have to login

or $uid === auth.uid which means users can only change the data stored under their usernames.

You choose which security rule you want to apply.

1 Like

So sir which is best rule to use for chat app
Because I am changing the rule first time

1 Like

How are you storing your data?
Is data stored under the user code retrieved from the Sign In component? If this is the case then you can use $uid === auth.uid

If you are nor sure then start with auth != null.

If you are not using the Sign In component then you have to use just true.

1 Like

Sir i am not using Sign In
I have only used this


User and Roomname for chatting and how to use that true
This is

This is for That username and roomame
and for chatting this code

1 Like

In this case, you need the Rules to look like this

{
  "rules": {
    ".read": "true", 
    ".write": "true"
  }
}
1 Like

Okay sir thank u but just see my prevoius post the [EDIT] one

1 Like

So may i remove dates ?

1 Like

I’m not sure which one you want me to see. Can you quote it please?

1 Like

Sir this

1 Like


Now also it is not showing the whole chat
@muneer

1 Like

By doing this


@muneer

1 Like

The rule is correct. Just remove the last comma.

{
  "rules": {
    ".read": "true",
    ".write": "true"
  }
}

This could be due to many things, One thing to do is to use the get block and show the data retrieved in a label. Do the get block on something you know is available in the database and you can see it from the database console.

1 Like

Sir can u just see the link and edit the project
https://x.thunkable.com/projectPage/613da012b8315a0011e74a39

1 Like