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

[FEATURE]: Crisp chat user registration / login integration #1670

Closed
1 of 7 tasks
jonsnowpt opened this issue Sep 19, 2023 · 6 comments
Closed
1 of 7 tasks

[FEATURE]: Crisp chat user registration / login integration #1670

jonsnowpt opened this issue Sep 19, 2023 · 6 comments
Assignees
Labels
🌟 [A] enhancement New feature or request 📣 [A] high priority Something that needs attention and accelerated resolving

Comments

@jonsnowpt
Copy link
Contributor

jonsnowpt commented Sep 19, 2023

Does a duplicate issue exist?

  • I have searched the existing issues

🤔 Is feature request related to a problem? Please describe the problem.

No response

📝 Feature Request Description

Since we must contact users to welcome them to the platform and inform them about essential features, we must integrate Crisp chat to gather the most relevant user data.

DATA TO BE ADDED TO CRIP USERS:

  • Name (username)
  • Email (email)
  • UID (uid)
  • Profile Photo (profile_photo)
  • Lang (lang)
  • competitions (number of competitions)

The data is added on registration and updated in every login.

➕ Further context and resources (cumulative)

We need to add the number of competition participations into the Firestore user profile:

[
  "lang",
  "profile_photo",
  "register_date",
  "competitions",
  "registration_type",
  0,
  "username"
]

This data can be gathered from the Hasura db:

competitions/data

How to add users and integrate custom data:

https://help.crisp.chat/en/article/how-can-i-automatically-set-custom-data-1xh7pqk/

https://docs.crisp.chat/references/rest-api/v1/#add-a-people-event

[22/09/2023]

Upon testing, it was noticed that the initial data for endpoint .../website/:website_id/people/events/:people_id does not update the correct segment of custom data as expected. Instead, the use of the .../v1/website/{website_id}/people/data/{people_id} and/or .../v1/website/:website_id/people/data/:people_id endpoints.

Important
Before being able to update data for a target user on CRIPS, it must be first created, it if does not exist, and relate it to a target Betarena Firebase (Firestore) UID. Otherwise, error of "reason": "people_not_found", will be returned.

@jonsnowpt jonsnowpt self-assigned this Sep 19, 2023
@jonsnowpt jonsnowpt added 📣 [A] high priority Something that needs attention and accelerated resolving and removed 🎨 Frontend labels Sep 19, 2023
@jonsnowpt jonsnowpt moved this to Icebox in Betarena Scores Sep 19, 2023
@jonsnowpt jonsnowpt moved this from Icebox to Todo in Betarena Scores Sep 19, 2023
@jonsnowpt jonsnowpt moved this from Todo to Icebox in Betarena Scores Sep 19, 2023
@jonsnowpt jonsnowpt moved this from Icebox to Todo in Betarena Scores Sep 21, 2023
@jonsnowpt jonsnowpt assigned migbash and unassigned jonsnowpt Sep 21, 2023
@migbash migbash moved this from Todo to In Progress in Betarena Scores Sep 22, 2023
@migbash migbash added this to the [FEATURE]: User Enhance milestone Sep 22, 2023
@migbash
Copy link
Collaborator

migbash commented Sep 25, 2023

Note
Created offspring task ➤ #6.
Created offspring task ➤ #245.

@migbash
Copy link
Collaborator

migbash commented Sep 25, 2023

Note
Already addressed as part of issue ➤ #6 .
Implemented, awaiting 🚀 deployment.

migbash added a commit that referenced this issue Sep 25, 2023
@migbash migbash moved this from In Progress to Staging in Betarena Scores Sep 25, 2023
@migbash migbash moved this from Staging to Testing in Betarena Scores Sep 25, 2023
@migbash migbash assigned jonsnowpt and unassigned migbash Sep 25, 2023
@migbash
Copy link
Collaborator

migbash commented Sep 25, 2023

Note
Testing on DEV was a success, with _my_ account having the data on Firestore and CRISP updated correctly, as an increment was visible from competitions_number: 10 to 11 and so did CRISP Associated Profile data.

jonsnowpt pushed a commit that referenced this issue Sep 25, 2023
* chore: update BetarenaUser scores-lib type;

* #1670 :: feat;

* #1685 :: fix;

* pkg :: scores-lib 1.6.18;
@migbash
Copy link
Collaborator

migbash commented Sep 25, 2023

Important
Currently, due to the nature of the data from competitions using nested JSON data for participants, all data for all competitions are retrieved, analysed, and updated for each participant present in a competition. This is because it's quicker and simpler to search by simply retrieving all competitions data, rather than query by JSON as a nested format.

Because of this, upon each user login, each competition participant will have their competition_number updated on Firestore, but not on CRISP. As the CRISP is limited to the supplied uid's. So if a user logs in, it will only update their CRISP Profile data.

@jonsnowpt
Copy link
Contributor Author

@migbash Update on last active

@jonsnowpt jonsnowpt moved this from Testing to Todo in Betarena Scores Sep 26, 2023
@migbash migbash assigned migbash and unassigned jonsnowpt Sep 26, 2023
@migbash migbash moved this from Todo to In Progress in Betarena Scores Sep 26, 2023
@migbash
Copy link
Collaborator

migbash commented Sep 26, 2023

Note
Re-opened offspring task ➤ #6.
Re-opened offspring task ➤ #245.

Applied data overhead reduction as part of sub-task, as well as, addition of user last active state, triggered both user presence on frontend.

Note
Implemented, awaiting 🚀 deployment.

Note
Live on dev from v852.

@migbash migbash moved this from In Progress to Staging in Betarena Scores Sep 26, 2023
@migbash migbash assigned jonsnowpt and unassigned migbash Sep 26, 2023
@migbash migbash moved this from Staging to Testing in Betarena Scores Sep 26, 2023
@github-project-automation github-project-automation bot moved this from Testing to Done in Betarena Scores Sep 26, 2023
jonsnowpt pushed a commit that referenced this issue Sep 26, 2023
* chore :: Makefile update;

* #1670 :: feat; correction to add 'activity' logic;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 [A] enhancement New feature or request 📣 [A] high priority Something that needs attention and accelerated resolving
Projects
Archived in project
Development

No branches or pull requests

2 participants