LalaCuteGroup / lala-referral

A referral service serving the members of LC TG Group
4 stars 6 forks source link

Create AWS Lambda that sends a message to another user #7

Open heiheihang opened 1 year ago

heiheihang commented 1 year ago

We need to create an AWS lambda that facilitates the communication between applicants and referrers.

The AWS Lambda should take the applicationId of the referral, and it should automatically infer that User A wants to send a message to User B

jonowo commented 1 year ago

How to distinguish between the cases where applicant sends message to referrer and referrer sends message to applicant?

heiheihang commented 1 year ago

My current thought of the command is like /chat {applicationID} {message}

Our backend knows who is sending this message. And from #10 we can tell that the other user will receive the message

jonowo commented 1 year ago

I forgot that the Lambda will also take the message from the user as input. ඞඞඞ

Ideally there should be an additional way to send a message which does not involve using commands. It can be achieved like this:

  1. A tells the bot to send a message to B
  2. The bot sends a message M to B containing the content sent by A
  3. B is able to send a response to A by replying to M directly without using a command
  4. Repeat with A and B swapped

This also handles the situation of talking to multiple applicants/referrers, eliminating the users' need to keep track of application IDs.

However the bot will need to know which user to relay the message to when the applicant ID is not specified.

ඞඞඞ

heiheihang commented 1 year ago

I agree with your suggestion. Suggestion 2 makes sense as we are likely to display the application ID to the applicant anyway.