sakshi-dhamija / Connect-Intellect

A Full Stack Realtime Chat Application with Authentication & SMS Notifications
https://connect-intellect.netlify.app/
0 stars 3 forks source link

Implement function to throw error when channel name is not specified. #2

Open sakshi-dhamija opened 3 years ago

sakshi-dhamija commented 3 years ago

Currently, if we try to create a channel without giving any name to it, it will generate a string like # !members-Z8TBhk-SmUjX4WQbQVfLWPXySbfsHsIEFLpiL2aRNMY as Channel Name. Hence, implement the function to throw an error when name is not specified.

gurpreet-legend commented 3 years ago

Can I work on this issue ? And also I am not able to sign in.

sakshi-dhamija commented 3 years ago

Hi @gurpreet-legend, yes you can take up this issue. Regarding the sign-in problem, did you run both client and server before trying to sign in? Also, to get more clarity, open the developers' console to check the error message. If you still face the problem, let me know!

gurpreet-legend commented 3 years ago

Hi @gurpreet-legend, yes you can take up this issue. Regarding the sign-in problem, did you run both client and server before trying to sign in? Also, to get more clarity, open the developers' console to check the error message. If you still face the problem, let me know!

Yes, mam, I have run both client and server separately. I am getting this error on the server-side, when I try to Sign in : [SiteError: This method can only be used server-side using your API Secret, use client = stream.connect(key, secret);]

sakshi-dhamija commented 3 years ago

Okay, I understood the issue. You need to create an account on stream and add another file containing credentials (hidden on Github). I'll add the detailed steps in the Contributing guide for this.

gurpreet-legend commented 3 years ago

Mam, please do update the Contributing.md file, as I have created my stream account as per your instructions

sakshi-dhamija commented 3 years ago

I have updated the readme for installation steps, which will clear your issue.

gurpreet-legend commented 3 years ago

@secrashi mam, I have set up the environment variables as per your instructions but I am still getting these two errors on the server-side : Error 1: StreamChat error code 2: QueryUsers failed with error: "Chat either expired or not activated. Check https://getstream.io/pricin at StreamChat.errorFromResponse (C:\Users\lostl\OneDrive\Desktoodules\stream-chat\dist\index.js:6147:15)

Error 2 : image

And moreover, there was a redundant ads variable in the catch block in server/controllers/auth.js which was giving an error before, I removed that, it was not necessary right ? image

sakshi-dhamija commented 3 years ago

@secrashi mam, I have set up the environment variables as per your instructions but I am still getting these two errors on the server-side :

Hi Gurpreet, Go to stream chat, open your app> chat>overview and add this link https://connect-intellect.herokuapp.com to webhooks, if the problem still occurs let me know:

And moreover, there was a redundant ads variable in the catch block in server/controllers/auth.js which was giving an error before, I removed that, it was not necessary right ?

Ya, that must have been added by mistake.