Skip to content

Create 021-presence-service #61

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

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

Create 021-presence-service #61

wants to merge 4 commits into from

Conversation

eldadfux
Copy link
Member

@eldadfux eldadfux commented Mar 21, 2024

# Presence service

* Creator: Eldad Fux
* Relevant Issues:

Choose a reason for hiding this comment

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


Create a presence. Set the user presence status, expiry (minutes/date - TBD), and permissions for who has access to see the current presence. This will imitate the equivalent action in the GraphQL and Realtime APIs.

```GET /v1/presences```

Choose a reason for hiding this comment

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

Lets please add response model. Im curious if there will be connection between presence ID and user ID, and if its public.

Copy link

@Meldiron Meldiron Mar 22, 2024

Choose a reason for hiding this comment

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

I am also curious what data can I set on presence.. message, icon, color? picture, age, status?


```GET /v1/presences```

List all presences, on client side this will show only presneces I have permission to view. On server it will show all presences on the server. This endpoint will support queries and pagination like any other list endpoint on Appwrite.

Choose a reason for hiding this comment

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

Hmm, I think we should have a shortcut for getting "my presences". I don't know how - I cant see good way. But I would still like it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could use a query filter with user id, but this is not as quick.

### Console updates

- We should implement presence in the console itself and make current org members online or not or last online
- We will add a new section under auth called `Presences`, this section will show a dashboard with usage showing how many people were online in a specific time range. Below that, we will show avatars of all currently online users or users who just recently went offline.

Choose a reason for hiding this comment

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

Hmm I imagined this as tab under user detail page. Can 1 user have multiple presences?

- userInternalId
- userId
- expiry (DateTime)
- status (string)

Choose a reason for hiding this comment

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

I think this should be JSON, since often apps need more than just a message. GitHub lets you set emoji. Discord lets you also set game you currently play. Instagram lets you ass music to your note.

- _updatedAt
- userInternalId
- userId
- expiry (DateTime)

Choose a reason for hiding this comment

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

Will exipry be nullable - never delete?

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.

3 participants