Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

馃敄 Feature description

We should add new event types that can trigger a function. Alongside existing ones, we should add new ones for real-time events, such as user connection or disconnection.

馃帳 Pitch

Currently, I am trying to build a real-time game and I need to know when a user disconnect, so I can do cleanup on the client-side of other players - remove a character of a player who disconnected. I don't think this is possible using current real-time features.

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

You must be logged in to vote

Replies: 13 comments

Comment options

@TorstenDittmann do you think it will make sense to add a callback for when the user disconnect?

You must be logged in to vote
0 replies
Comment options

Not sure how the channel and permissions should look like for this 馃

You must be logged in to vote
0 replies
Comment options

Not sure how the channel and permissions should look like for this 馃

Maybe for start, just allow callbacks in the SDK level, no implementation on the server side, or is that already supported?

You must be logged in to vote
0 replies
Comment options

I also need some user presence detection. Is there any movement on this ?

You must be logged in to vote
0 replies
Comment options

@TorstenDittmann Any update? I am planning to set up a chat server and need the user's Online / Offline presence support. Is there any workaround you can suggest to how to handle the user's disconnection or point to some resource?

I think this is really helpful for real-time chat apps. Rest can be handled by real-time updates from collections. But the socket connects and disconnect event is missing which can be added.

Waiting for an update.

Regards,
Punit Diwan

You must be logged in to vote
0 replies
Comment options

Any update on this? The mentionned issue is not about presence system, it's about client-side events

You must be logged in to vote
0 replies
Comment options

Yes, it would be nice to handle clientside connects/disconnects. I think it's an important action when we use Realtime data. There is any solution to handle that?

I think the possible solutions:

  1. Allow to use custom realtime implementation. (Currently it's private) ( https://github.com/appwrite/sdk-for-web/blob/master/src/client.ts#L182 ) It can gives a lot of options to change default realtime implementation. Like change getTimeout logic, write attempt limiter, etc.
  2. Create Callback like:onRealtimeConnectionChanged()
  3. Use channels ( 馃殌 Feature: Websocket Connect and Disconnect Events聽sdk-for-web#40 (comment) )
You must be logged in to vote
0 replies
Comment options

Is this feature being considered? I've also seen this feature request on the appwrite discord regularly.

You must be logged in to vote
0 replies
Comment options

It is very old requested feature, but also it has still high-demand like push-notifications feature.

I came here from firebase, when i was in DB, i solve presence issue by writing Cloud Function there. Anyways, my migration from firebase to appwrite almost completed except this issue.

Is it possible way to solve it by writing an appwrite cloud function ? If yes, please link, mention, any referance, sample function or readings that i need. Because it seems like it will take time for this feature to be released. Big Thanks!

You must be logged in to vote
0 replies
Comment options

discord related link
Screenshot 2023-10-17 at 19 01 15

Up!

You must be logged in to vote
0 replies
Comment options

any update on this ?? @stnguyen90

You must be logged in to vote
0 replies
Comment options

I am also waiting an update about it as well.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request api / realtime Fixes and upgrades for the Appwrite Realtime API.
10 participants
Converted from issue

This discussion was converted from issue #2418 on March 10, 2026 14:12.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.