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

Wave Command to Display Dynamic List of Active Users #20

Merged
merged 4 commits into from
Dec 17, 2023

Conversation

SevanBadal
Copy link
Owner

@SevanBadal SevanBadal commented Dec 11, 2023

Issue

There is no way to tell when other users are active on the application

Solution

Create a command that broadcasts their presence on the application.

  • A command named wave that runs until the user terminates it via :quit
  • This terminal window can be left open in the background
  • When other users start waving, a synchronized state is spread to all "waving" users via Supabase's presense api.
  • OS notifications are pushed when a new user joins via node-notifier

Additional Information

There is an issue with the icon displaying in the native notification UI. node-notifier allows you to specify an absolute path to an image like this:

        nodeNotifier.notify({
          title: "New users have entered 📦",
          message: newUsers.join(', '),
          icon: '/absolute/path/to/image.png'
          sound: true
        });

However, I haven't gotten it to work on Mac. My issue is similar to this one: mikaelbr/node-notifier#71

@SevanBadal SevanBadal marked this pull request as ready for review December 15, 2023 19:13
Copy link
Collaborator

@vietthom vietthom left a comment

Choose a reason for hiding this comment

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

Looks good!

@vietthom vietthom merged commit 82b6d95 into main Dec 17, 2023
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.

None yet

2 participants