2
0
mirror of https://github.com/frappe/frappe.git synced 2024-06-12 19:02:21 +00:00
Commit Graph

80 Commits

Author SHA1 Message Date
Ankush Menat
5e4e60b509 refactor: Split socketio in multiple logical files 2023-07-01 10:53:34 +05:30
Ankush Menat
b2366bf8a6 fix: accurately handle socket close/loss event 2023-07-01 10:53:34 +05:30
Ankush Menat
4ea6f3d672 perf: dont send doc view updates to self 2023-07-01 10:53:34 +05:30
Ankush Menat
97c1106aca refactor!: Remove doc typer code
- This hasn't worked since v13 refactor and no one has noticed.
- Needs better implementation.
2023-07-01 10:53:34 +05:30
Ankush Menat
3414c0d063 refactor!: Merge redis_socketio and redis_queue
- realtime communication uses pub-sub and no storage. So using same
  redis server for both should be just fine.
- This is how FC works since quite a lot of time. We haven't seen any
  problem so far.
2023-06-11 11:40:22 +05:30
Ankush Menat
516540ede9
perf: unsubscribe from list_update events (#20423) 2023-03-22 10:02:37 +05:30
Gavin D'souza
c960382667 fix(socketio)!: Event list_update > doctype_subscribe 2022-12-28 00:25:58 +05:30
Matthew Enderle
3885833764
fix: socketio spawn error (#19070)
* fix: socketio spawn error

Restarting supervisorctl fails when attempting to spawn the instance due to syntax.

* refactor: accurate expansion of optional chaining

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2022-12-01 10:41:42 +05:30
Gavin D'souza
40df601a73 fix: Auto-add all users to website room
Keep website room open for all - currently only used for discussions
2022-11-17 17:04:07 +05:30
Gavin D'souza
16bd7a2d0b fix(socketio): Scoping & hoisting bugs
Due to the previous logic, cookie data seemed inconsistent causing ghost
sessions.
2022-11-16 23:02:23 +05:30
Gavin D'souza
96fee8c293 feat: {site}:website room open to all users
- Subscribe to room and pass messages without auth
- Pass `room='website'` to publish_realtime to use
- Pass discussions' comms through particular site's website room
2022-11-16 21:53:49 +05:30
Ankush Menat
45b0c3e28d chore: remove dead code 2022-11-16 14:05:53 +05:30
Gavin D'souza
3a8fa6cbd5 refactor(socketio): Use same room for doc & info events
other changes
- Name list room as doctype room for more generic use
- avoid re-setting up listeners for generic events
- discard docinfo_subscribe event
2022-11-15 17:55:53 +05:30
Gavin D'souza
97d2eab3e2 refactor(socketio): docinfo_update
- Rename event from `update_docinfo_for_{}_{}` to docinfo_update
- Separate rooms for separate documents generated on requirement
- Check if user has access to doc before sharing docinfo
2022-11-15 13:15:34 +05:30
Gavin D'souza
9931c3af04 refactor(socketio)!: list_update
- Subscribe to list_update only for the list/report views that are
  opened
- Check if user has read permission for doctype to subscribe to list
  updates
2022-11-15 13:15:34 +05:30
Gavin D'souza
e97994f211 chore: Drop duplicate event method
This particular definition was chosen since there was no corresponding
subscribe method with the same key generation logic
2022-11-15 13:15:34 +05:30
Gavin D'souza
54bf617d09 perf(socketio): get_site_name
The usages and number of conditions evaluated in the function called for
some sort of a cache. If the site name is evaluated once, store it in
the socket object!
2022-11-15 13:15:34 +05:30
Gavin D'souza
4de9c39bb8 refactor: SocketIO
- Check request data in middleware
- Authenticate each connection before allowing room access
- Allow site room access only to System Users, restrict Website User &
  Guests to their respective user rooms

Note: This doesn't check for roles / permissions
2022-11-15 13:15:30 +05:30
Sagar Vora
ff0c820c9c
chore(socketio): remove duplicate event handler (#18770) 2022-11-05 21:36:07 +05:30
Ankush Menat
40f27f908a style: format JS files with prettier 2022-08-04 14:51:01 +05:30
Ankush Menat
734bc7681b fix(realtime): "X is viewing" doc broken 2022-07-29 16:36:35 +05:30
Suraj Shetty
2ea0b58873 fix: Allow all origins with credentials 2022-07-01 17:54:50 +05:30
Suraj Shetty
05f416e448 refactor: Removed vendored socketio library
- Removed vendored socketio library
- Add socket.io-client library
- Removed unnecessary code in socketio server
- Remove chat related code
2022-06-29 14:58:13 +05:30
mergify[bot]
edea08718c
fix: publish realtime to work with localhost (backport #14174) (#14196)
Co-authored-by: leela <leela.vadlamudi@gmail.com>
2021-09-14 12:09:01 +05:30
Faris Ansari
adc236e35d feat: Notify build events to browser
- Update assets_json directly from node
- Show error overlay or success message
- Open file in editor from error overlay
2021-05-01 16:02:49 +05:30
Sagar Vora
8cdb459895
chore: Remove unused code (#12703) 2021-03-27 17:46:15 +05:30
Sagar Vora
c4b0f54943
chore: Remove unused code (#12671) 2021-03-25 14:25:36 +05:30
Sagar Vora
c1911a0858 refactor: remove unused parameter, minor cleanup 2021-02-16 14:16:30 +05:30
Sun Howwrongbum
31dee5d7d4
fix: send unique users during notify 2020-10-01 02:00:18 +05:30
prssanna
fa3c6096c5 style: missing semicolons 2020-06-18 14:50:45 +05:30
prssanna
1afdc6b992 feat: show users that are currently typing on the form 2020-06-18 14:50:45 +05:30
Suraj Shetty
b1cadbf018 fix: Limit retries 2020-04-12 20:03:24 +05:30
Suraj Shetty
033c183e53 style: Fix formatting and eslint issues 2020-04-12 19:39:52 +05:30
Suraj Shetty
5c8effe7a1 fix: Retry to join chat room till server starts 2020-04-12 19:30:43 +05:30
Aditya Hase
f3b959b1fe frappe: refactor async to realtime (#6015)
* frappe: refactor async to realtime

* frappe: refactor async to is_async
2018-08-28 15:31:20 +05:30
Faris Ansari
b3249fd23a feat(build): Log build errors in browser console (#5932) 2018-08-07 14:42:39 +05:30
Achilles Rasquinha
c269d433bd [min] remove dead code 2018-03-31 16:40:59 +05:30
Achilles Rasquinha
5ed33335de Merge branch 'develop' of https://github.com/frappe/frappe into website-chat 2018-03-26 16:01:55 +05:30
Achilles Rasquinha
72e2aec148 Fixed Codacy 2018-03-26 09:50:58 +05:30
Achilles Rasquinha
c480a86ac0 Fixed Codacy 2018-03-26 09:23:01 +05:30
Achilles Rasquinha
5f522510d5 Functional Website Chat 2018-03-26 01:36:03 +05:30
Achilles Rasquinha
0cff49c460 socketio.js cleanup 2018-03-25 22:35:46 +05:30
Achilles Rasquinha
474e219e97 Raw commit 2018-03-22 17:34:07 +05:30
Achilles Rasquinha
22a318a9ff fixed throttling 2018-03-19 19:10:57 +05:30
Rushabh Mehta
8f0465f57e [fix] socketio.js for firefox 2018-01-25 17:46:38 +05:30
Achilles Rasquinha
2d5d367298 chat-fixes 2018-01-02 12:50:36 +05:30
Achilles Rasquinha
0e68b8b175 remove socketio logs 2017-12-29 10:38:48 +05:30
Achilles Rasquinha
005cfe3dc8 🎉 NEW Frappe Chat (#4612)
* added doctypes, created frappe chat ui

* added component layout with state-like abilities, added apis

* updated user doctype, moved from state-like feature and component abstraction

* added room component

* fixed publish_realtime with after_commit = True

* created room component and searchbar

* minor fix

* functional message parsing

* update

* Added Chat Profile

* added chat message

* more changes into chat room

* fixed APIs, added client side scripting

* added chat message attachements, more doc updates

* Brand New UI with socket io room integration

* completed socketio integration. off to room subscription and publish

* realtime room update

* raw update

* initialized docs, added p2p connection for call tests

* updated docs

* added coverage, updated api for ease of use

* raw commit

* added test cases

* Chat Room updates and new room creation

* added chat group creation

* added collapsible plugin

* toggable room view

* updated

* [RAW]

* updated UI for chat

* Deleted Previous Chat Page

* moved from frappe.Chat.Widget to frappe.Chat

* modularized frappe-fab

* added more docstrings

* tried adding conversation tones

* Added conversation_tones and refurbished chat popper

* modified frappe.ui.Dialog, moved from AppBar to ActionBar, responsive for Mobile 💃

* moved RoomList item namespace

* Configurable Desktop update, moved profile updates to on_update

* added state change listeners

* removed AppBar to ActionBar customizable 💃

* added destroy method

* removed coverage, refactored group creation

* Successful Chat Rooms and Group creation

* sort rows based on last_message_timestamp or creation

* added frappe._.compare

* removed redundant less variables

* Chat Room back button with custom routing and destroy methods

* Added EmojiPicker

* fixed multiple dialog render

* setup quick access

* added chat chime, functional chat message list updates at room list

* deleted package-lock.json

* realtime date updates

* updated chat message list

* functional message render and updates

* added track seen

* added typing status

* updated typing status

* valid typing statuses and quick search

* Functional Quick Search

* reverted fix

* some more cleanup and promisifed

* fixed hints close on click

* updated fab boldness

* close popper on click panel

* close popper on click panel

* reverted octicon-lg, fixed popper heading click

* new frappe capture

* removed webcamjs

* added uploader and capture

* removed chat FAB, added as notification instead

* on message update
2017-12-28 18:58:43 +05:30
Rushabh Mehta
630d30d89a [fix] remove filter 2017-09-29 12:10:34 +05:30
Rushabh Mehta
9b6ad9022c [fix] smaller chunks, longer keep-alive (#4196) 2017-09-27 13:24:50 +05:30