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

fix: undefined member access on group actions and hide left members from chat list #1177

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sachin-into
Copy link
Collaborator

@sachin-into sachin-into commented Apr 5, 2024

dependent on PR #1167

fix #1192

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for testitori ready!

Name Link
🔨 Latest commit 2cfdadc
🔍 Latest deploy log https://app.netlify.com/sites/testitori/deploys/6661395be815380008e988e8
😎 Deploy Preview https://deploy-preview-1177--testitori.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 2cfdadc
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/6661395b58812900081db25a
😎 Deploy Preview https://deploy-preview-1177--teritori-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sachin-into sachin-into changed the title Fix/group chat fix: undefined member access on group actions Apr 5, 2024
@sachin-into sachin-into changed the title fix: undefined member access on group actions fix: undefined member access on group actions and hide left members from chat list Apr 5, 2024
data={searchResults.filter((result) => {
if (
result?.type === "group" &&
(!result?.members || result?.members.filter(Boolean).length === 0) // Hiding conversation from left member of the group
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, quite complex logic

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when user leave group, got members array with single 'undefined' element so filtered it out.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better fix at root of problem

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -168,7 +168,6 @@ func StartHTTPServer() {

if err := httpServer.ListenAndServe(); err != nil {
log.Println("weshnet: http listenAndServer err", err)
panic(errors.Wrap(err, "failed to start http server"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this still required or at least a good idea to have?

Copy link
Collaborator Author

@sachin-into sachin-into Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's good to have but having it crashed app when disabling chat via toggle switch on android

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

Successfully merging this pull request may close these issues.

Mobile : Group name textbox UI issue
4 participants