Special global ID for each user

Hello, I am preparing a messaging application, where each user will add an ID to his account when he logs in for personal messaging, and the other party will write this ID and send a personal message to that person. How can I do that?

What kind of DB are you planning to use for this? I would recommend Firebase.

These users, are they always needed to set a new ID for each chat?

Or do you want unique ID for the users? Could you please describe this a little more :muscle:

Could you tell what this chat is all about? There’s many guides, blocks, tips and so on in community regarding chat possibilities, have you read those?

I am creating a messaging application where a user ID will be added as soon as the user registers. When the other party enters the ID of the person they want to message with the same ID in the search field, the name of the person belonging to the ID will appear on the screen and click to send the message

So, what you want is to be able to have a 1to1 conversation between users, not a “public” chat?

Yes, 1a1 conversation

1 Like

I will see if I have some time today to create a sample AIA to give you on how to manage it. I have a few kids here who also needs attention, so I’ll see what I can do :muscle:

1 Like

Thank you, I am waiting for your answer

1 Like

Hello. Did you find a solution?

Hi, unfortunately I have not had time. But I have a couple hours free now before I go to bed. I will try to put together some blocks as example :wink:
I will see if I can manage to give example with firebase, since firebase is best for chat, but if I don’t manage before I go to sleep I will give an example with airtables, since that is very easy and quick to put together (and you will also get the idea of how it works). I will give for firebase hopefully tomorrow if I don’t finish it tonight :slight_smile:

1 Like

It’s okay, I’m waiting, the result will be successful. Better with Firebase. :slightly_smiling_face:

1 Like

Hi again, I’ve done almost everything. But I’m trying to solve an issue with switching between different conversations. I’m not able to find a solution atm since it’s in middle of the night. But I will continue tomorrow and hopefully I will find a solution so I can send aia :wink:

btw, I made the user registration system with airtables(since I’m not that familiar with Firebase Authentications yet), but all chat are based on firebase. But I guess that’s no issue to edit blocks to your needs if you want to use Firebase also as a users database.

1 Like

Thank you. I am waiting you

Good morning!
Just wondering as my thought was not to use any extensions in example, but what do you say using extensions in example aia? I’m currently using inbuilt ChatView, but do you mind me using extension to make the view better? I think it also will be less blocks, but not sure yet. What do you say?

I have 1 hour ish now to do some work on project since the kid is asleep, then I will continue tonight again and hopefully get it finished :see_no_evil: :crazy_face:

1 Like

Can you add send pdf file to airtable via cloudinary, instead of text alone

Well, that’s going off topic since this topic is related to making 1to1 conversation based on users ID. But ofc with this example I will provide you can use same extension used in example to send files. But that you have to make another topic for or ask in extension topic if you don’t figure it out yourself after trying :muscle:

I will provide AIA hopefully tonight. Just came home, so I will try to finish it now after kid is asleep.

1 Like

Hi again, I’m having trouble with firebase values to be placed correctly. Sorry for the delay. I will continue tomorrow, since it’s late now my head is not with me :face_with_spiral_eyes:

(Update 07.06.22 00:24) - The project is almost finished, I’m currently working on getting the chat conversation to be ascending, now it shows in random order, have no idea why :confounded: The firebase stores it correct, but when I get the data from Firebase it saves randomly in global variable :confused:

1 Like

If you are using firebase, use Firebase user ID.
Or if you don’t want to let the user ID public, use reverse ID (ex: if firebase ID is abcd user id will be cdba) or something similar like “name”+“id”+“dateofregister”. Example: My id could be “pablo12dsalsd341234106062022”

As you can see on DB I want it to be sorted like this based on Tag value:

This is how I get the data from Firebase:

Now, with these tags the order of list becomes like this:

Here it is :wink:
It might not be the best way, but it’s a solution for a 1to1 conversation between users.

All you have to do now are following:
Add Firebase Token and URL in Firebase Database1 and 2.
Add Airtables API Key and Base ID

Then your good to go :slight_smile:

I haven’t used any kind of security methods, so that you have to add yourself.
You can also change the view of what to be seen, instead of users ID you could show users email or username.

If you need any help, just ask :slight_smile: I hope it helps and it’s what you expected :see_no_evil:

Airtables stores data like this


Firebase stores data like this


AIA file:
ChatExample.aia (186.2 KB)

Have you tested? Would be great with a feedback :blush: