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

API /chats/ #555

Open
phwizard opened this issue Sep 10, 2024 · 0 comments
Open

API /chats/ #555

phwizard opened this issue Sep 10, 2024 · 0 comments
Assignees
Milestone

Comments

@phwizard
Copy link
Contributor

API route needs to be created or updated to allow for the following features.

Create a chat room.
Delete a chat room.

Create a chat room
POST /chats/
optional parameters:

  • 'access' = [ "public", "private" ] Default: private. Public Chats can be joined by any User who has access to the server and knows its address. Private Chats can only be joined by Users explicitly added via API or by room owners/admins.
  • 'UUID' (or 'externalId') = integer. Here you may store reference IDs of entities in your existing business logic. This allows you to tie Chats with your existing business logic without having to store JIDs generated by Ethora.

When creating a new Chat, /chats/ will return the request status and if successful, JID of the newly created Chat.

In database, ownerApp record should also be created which will record which App owns this Chat.

Delete a chat room
DELETE /chats/
parameters

  • either JID or UUID/externalId must be specified to delete a chat room.

Verify ownerApp if corresponds to the App API key / JWT. If so, delete the Chat.

Description: Delete the Chat when your business logic doesn't need it anymore. Note: all chat history will be deleted as well through this action.

More details in forum here: https://forum.ethora.com/topic/22-integrating-ethora-chat-component-users-system-with-your-existing-legacy-system/

This is to support Use Case N3 as described here: https://forum.ethora.com/topic/21-chat-component-use-cases-for-users-authentication/

@phwizard phwizard added this to the 24.09 milestone Sep 10, 2024
@phwizard phwizard changed the title /chats/ API API /chats/ Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants