Delete subfolders in firebase

Hello everybody. I am doing a chat app and have a problem. if someone sends a friend request this is stored in firebase for each username (in the example test + test2) if i want to reject the friend request, the tag should disappear in the firebase but only for the chosen user. I just manage to delete all users. Can someone help me please

It all comes down to the tags. Is this variable specific enough for the user, or is it a general request?

You can create and delete any path in firebase by based on the bucket url, and then adding “subdirs”

Chatapp/Gaara/Anfrage/Abgelehnt/ . or Chatapp/Gaara/Anfrage/Genehmigt/

You can use the text join component to help “assemble” the tag.

Does that help?

Thank you for your help. Sounds very logical but I have trouble implementing this. do you want to look at my aia and show me a concrete example? I would be very grateful. the problem is synonymous if I want to delete individual friends

GaaraChatNeu.aia (131.2 KB)

Notice how I use the Join function here?

Everything is then based on the Name. I would suggest you think of the structure you want.

Name/Details —> . Name, password, image etc
Name/Contacts —> friends
Name/Stats —> number of times connected, rejections of people etc
Name/Chat --> actual chat details

So when you do a store or a get you can use the join funnction to join the name to whatever subdirector you want to then write the value. The Tag is assembled based on its function

Here is an example of one of my projects from firebase.

1 Like

Thank you very much, that helps me a lot. I’ll try it.

1 Like

Click the checkmark if it does help so others know this is a solution. Thanks

1 Like

since i am still quite a beginner, it will probably take some time to get it done. once it’s done I’ll mark it as a solution;)

take your time, and if you need any help let me know,.

Another tip, You can have more than one firebase component. It might be easier for you to have two of them. One for “administrative stuff” and the other for “chat”

I find the filtering through tags can be very very long blocks when you have a bunch of directories, so it is easier to manage if You have two components.

Also with your filtering o the “get.Tag”… use this as your assesment logic. It will make things easier.

image

Now I’m a bit overwhelmed. sit for hours on the app and now need a break. your info will finally make my head explode :stuck_out_tongue: i made this app from an example aia i found and am learning to personalize the aia because tutorials do not help me at all because they are all in english or indian. This allowed me to learn a lot and got an understanding of it. But more complicated things that are not in the aia are causing me problems. That’s why I’m always very happy about help. Thank you very much again, I will contact you again as soon as I have calmed my brain something: P
did you mean that with several firebase components? I already have that :slight_smile:

1 Like

Something like that. Don’t go overboard… but it will help. Just be organized and methodical. Once your brain cools down, you will see it is very simple in the end, if you think about it properly :wink:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.