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

[CHAT] Invitation process #986

Open
tprudentova opened this issue Nov 16, 2023 · 9 comments
Open

[CHAT] Invitation process #986

tprudentova opened this issue Nov 16, 2023 · 9 comments
Labels
FT::INVITATION Features connected to the invitation process Milestone::M1

Comments

@tprudentova
Copy link
Collaborator

tprudentova commented Nov 16, 2023

  1. Invitation via exact Matrix ID
  2. Invitation of users that don't use Twake
@tprudentova tprudentova converted this from a draft issue Nov 16, 2023
@chibenwa
Copy link
Member

Security limitations:

  • No customization of the text being sent
  • Rate limiting for invites: Eg no more 10j. If more: contact Linagora.
  • Do not send the same invite twice.

@tprudentova tprudentova changed the title Invitation process [CHAT] Invitation process Nov 16, 2023
@tprudentova
Copy link
Collaborator Author

tprudentova commented Nov 20, 2023

Goal of the feature

  1. The goal is to attract more users to the app as well as allow existing users to chat with people they know (easy to do chat or group chat)

User story

Inviter view

There are 2 ways I can invite users that don’t yet have TWP:

  • By clicking the Invite button at the top-right corner of the Chat screen (tab chats)
  • By clicking the Invite button in the contacts list (tab contacts)
Screenshot%202023-11-15%20at%2009 57 27 Screenshot%202023-11-10%20at%2010 52 22

Invite from Chat tab

Clicking the Invite button opens an invitation pop-up. It includes the following:
Screenshot%202023-11-15%20at%2010 10 04

  • A small informational description
  • A box for entering the phone number

If I enter phone number in wrong format and click Send, the invitation isn’t sent, the field is highlighted in red and a warning “Please, enter phone number in correct format” appears
Screenshot%202023-11-15%20at%2010 14 01

If I leave the field empty and click Send, the invitation isn’t sent, the field is highlighted in red and a warning “This field cannot be blank” appears
Screenshot%202023-11-15%20at%2010 35 57

  • A Contacts button

Clicking it redirects me to the Unregistered users section of the Contacts tab. From hereon I follow the Invite from contacts tab path (that is described below). If I haven’t yet given access to my contacts, I’m asked to give access.

  • Cancel

    Clicking it closes the Invitation pop-up

  • Send

    If I click Send after entering the correct phone number, an SMS message is sent to the entered number with text “Hello there! It’s Name Surname, I’m using Twake Chat. Join me! link”. The message is sent in English by default, in French if the phone number starts with +33, in Vietnamese if it starts with +84, in Russian if it starts with +7. English for all other country codes.

    When the invitation is sent, I see a toast message.

Screenshot%202023-11-15%20at%2014 14 41

Invite from Contacts tab

If I click on the Invite button next to a contact in the contacts list, the Invitation pop-up opens. The box for entering phone number is pre-filled with the phone number of a selected contact.

Screenshot%202023-11-15%20at%2011 40 35 Screenshot%202023-11-15%20at%2011 40 53

If the contact has more than 1 phone number in my device’s phone book, I see a pop-up for selecting one first. I select by clicking on the correct number. Then the Invitation pop-up opens, it is also pre-filled.

Screenshot%202023-11-15%20at%2011 41 51

For the rest of the flow see Invitation pop-up section above.

Invitee view

Invitee receives an SMS message to their phone number that contains the following text:

The invitation SMS contain the following text:
“Hello there! I’m using Twake Chat. Join me! link**”
Link from the message leads to landing page where I can find a link that redirects me to app store/google play, depending on my OS.

When the invitee follows the link, download the app, completes sign-up and appears inside Twake Chat, they see a pending invitation from me.

Acceptance criteria

  1. I can invite people to Twake direct Chat via SMS.
  2. I can manually insert phone number.
  3. I can select a contact to invite from my list of contacts.
  4. If I select a contact from my list of contacts, I don’t need to manually type the number.
  5. I can select necessary phone number if the contact in my device’s address book includes more than one phone number.
  6. The invited person can receive an SMS with welcoming text and a link to download Twake Chat
  7. Text of SMS message can be English, French, Vietnamese or Russian depending on the country code of the invited person.
  8. The invited person can download the app following the link in the SMS. Languages of app correspond to languagesge of device
  9. When the invited person downloads Twake Chat and signs up, they can see a pending invitation from the inviter.

Mockups

https://www.figma.com/file/K1h49fSG6LxKXUojYLbwGL/Twake-Mockups?type=design&node-id=488%3A307&mode=design&t=Y0BklNw3IPCguRVs-1

@shepilov shepilov moved this to 🏗 In progress in Twake Workplace Dec 22, 2023
@hoangdat
Copy link
Member

hoangdat commented Dec 28, 2023

Third party invite (i)

  • Docs: https://spec.matrix.org/unstable/client-server-api/#third-party-invites
  • Notes:
    • this is only supporting to invite people to join a chat
    • a deeplink will be sent to email/phone number
    https://domain.tld/#/room/%21MalvWMbAGJhMgeBBnJ%3Amatrix.org?email=alice_matrix%40yopmail.com&signurl=https%3A%2F%2Fvector.im%2F_matrix%2Fidentity%2Fapi%2Fv1%2Fsign-ed25519%3Ftoken%3DwYTrwVSMjuLJveSCHsbREHibQglAiTqtPuzQItUgDXRQRQJGmOPvecvXRhKcwjAjrHYmbEGKdzorZrMFHwMvJvahXukUpzolrZZjSlHtxSiRpRLolUMbbVqbegBlbwJk%26private_key%3DLD5TGcNqyNEmQr3J0zCdI_kvMERxxgrVesLe_hVY8rc&room_name=hello%20-%20renamed%20-%201&room_avatar_url=mxc%3A//matrix.org/hVsKlTWovDRlvsIavcqRdAOd&inviter_name=Dat%20Pham%20H&guest_access_token=&guest_user_id=&room_type=
    
    • in the case of mobile but not install app: redirect to web app
    • in the case of mobile but app installed: redirect directly to the app (dont care the current account, verify will be done later....)
    • in the case of web: redirect to web app

@hoangdat
Copy link
Member

Third party invite (ii)

Inviter

Invitee

@hoangdat
Copy link
Member

  • What we expect when invite user? Invitee should be in a direct chat with inviter? Or anything else?
  • how to see the pending invitation in invitee's client app?
  • how to indicate that an invitation was sent for a contact?

@hoangdat
Copy link
Member

  • try the process of element.io

@hoangdat
Copy link
Member

/_twake/sms

{
  "to": "string",
  "text": "string"
}
  • what server have this endpoint?

@shepilov shepilov added the FT::INVITATION Features connected to the invitation process label Jan 25, 2024
@tprudentova
Copy link
Collaborator Author

Relevant User story: #2186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FT::INVITATION Features connected to the invitation process Milestone::M1
Projects
Status: 🏗 In progress
Development

No branches or pull requests

4 participants