Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Between direct delivery and retrieval from database #15

Closed
adonese opened this issue Sep 21, 2022 · 9 comments
Closed

Between direct delivery and retrieval from database #15

adonese opened this issue Sep 21, 2022 · 9 comments
Assignees

Comments

@adonese
Copy link
Member

adonese commented Sep 21, 2022

i think we should generate an id for the message whenever we construct a message. That will allow us to then identify the message and set its is_delivered status to true upon sending a message

@mseltahir
Copy link
Member

Great, should we use UUID or do you have something else in mind?

@mseltahir
Copy link
Member

Also, do you think the id generation should happen after we receive the message from the ws connection or that we should receive it with the message i.e. the android client generates the message ID?

@adonese
Copy link
Member Author

adonese commented Sep 22, 2022

I was thinking about uuid

@adonese
Copy link
Member Author

adonese commented Sep 22, 2022

i don't like them to be generated in the client, but at the same time, i really would love if we have would do as little as possible in the server. the ws in itself is demanding enough

@mseltahir
Copy link
Member

If we are to use uuid, we should change the message ID type from int to string.

@mseltahir
Copy link
Member

mseltahir commented Sep 22, 2022

i don't like them to be generated in the client, but at the same time, i really would love if we have would do as little as possible in the server. the ws in itself is demanding enough

I too would prefer if it was on our side, I don't think it would take more than a few lines and we have the benefit of checking for the rather very unlikely case of key collision.

@adonese
Copy link
Member Author

adonese commented Sep 22, 2022

ok i will leave this for you

@mseltahir
Copy link
Member

On it.

@mseltahir
Copy link
Member

This was resolved in PR #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants