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

feat(chat): chat service #135

Merged
merged 11 commits into from
Aug 17, 2021
Merged

feat(chat): chat service #135

merged 11 commits into from
Aug 17, 2021

Conversation

samuelmasse
Copy link
Contributor

WIP

Comment on lines +29 to 30
const { conversationId, payload } = req.body
const conversation = await this.conversations.get(conversationId)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: remove channel from request schema. Also remove from client

}
}

async send(conversationId: uuid, authorId: uuid | undefined, payload: any, from: any): Promise<Message> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: remove all the code from this function and make it event based (maybe?)

@@ -10,7 +10,6 @@ export class ConvmapTable extends Table {
table.uuid('tunnelId').references('id').inTable('msg_tunnels').notNullable()
table.uuid('conversationId').references('id').inTable('msg_conversations').notNullable()
table.uuid('threadId').references('id').inTable('msg_threads').notNullable()
table.unique(['tunnelId', 'conversationId'])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: migration to remove this unique constraint

@@ -10,7 +10,6 @@ export class UsermapTable extends Table {
table.uuid('tunnelId').references('id').inTable('msg_tunnels').notNullable()
table.uuid('userId').references('id').inTable('msg_users').notNullable()
table.uuid('senderId').references('id').inTable('msg_senders').notNullable()
table.unique(['tunnelId', 'userId'])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: migration here as well (do we even need usermap?)

@samuelmasse samuelmasse marked this pull request as draft August 17, 2021 00:45
@samuelmasse samuelmasse marked this pull request as ready for review August 17, 2021 19:40
@samuelmasse samuelmasse merged commit e0a7ac0 into sm-webchat Aug 17, 2021
@samuelmasse samuelmasse deleted the sm-webchat-2 branch August 17, 2021 19:42
samuelmasse added a commit that referenced this pull request Aug 19, 2021
* use latest client version

* ddd

* fix

* add socket.io

* cors

* very basic communication with server

* bump client version

* feat(server); nologo option

* doc

* put back old stuff

* implement events make render structure

* better setup

* test messages

* locale

* ui helpers

* improvement

* ui error handling

* element

* style and textbox

* storage

* client deserialize dates

* deserialize health

* message form

* postMessage

* dont post when empty

* convo details

* seperate debug ui

* save convo

* refact ui

* fix

* remove random lodash

* setup socket.io

* send better messages

* disconnect

* base package

* skin package

* yarn.lock

* move things to skin package

* emitter to base

* fix

* socket request

* some progress

* reorg

* functionning one way

* dirty but it works

* chore(base): implement base package

* remove unused files

* move rewire

* fixes

* remove ts-config-paths

* use yarn workspace script

* remove client from root references

* scroll to bottom on message

* some css

* refactor 1

* refact

* refact

* user events

* cleanup webchat

* rename

* cleanup 2

* dark theme

* lang

* socket package

* socket package ++

* manual connect

* socket package progress

* various fixes

* socket service

* remove socket and web channel

* user sockets schemas

* messages socket schema

* safety improvements

* fix

* cache sockets

* fix

* feat(chat): chat service (#135)

* chat service

* remove dead code

* fix

* refact socket service

* fix

* faster caching

* fix

* refact

* fix

* fix

* better ui

* ENABLE_EXPERIMENTAL_SOCKETS

* sandbox

* undo changes in table

* users.auth validate client exists

* fix keep channel name when only one convmap

* fixes

* fix

* typings for send

* STORAGE_ID
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

1 participant