diff --git a/.gitignore b/.gitignore index ff63bcf97..4f042bdb1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,6 @@ tags node_modules -raven/public/raven-app +raven/public/raven raven/public/node_modules -raven/www/raven-app.html \ No newline at end of file +raven/www/raven.html \ No newline at end of file diff --git a/README.md b/README.md index cc45741e4..559ee940c 100644 --- a/README.md +++ b/README.md @@ -114,46 +114,6 @@ The mobile app is built using [Ionic](https://ionicframework.com), [Tailwind CSS -
- -#### Work in progress 🚧 - -The mobile app was set up using Capacitor, Ionic and React: -1. Set up authentication on the mobile app -2. View all channels, private messages and profile on mobile app -3. View a channel's messages (text, images and files) on the mobile app -4. Send a message on a channel. - -New features were added to the web app: -1. Ability to create an "Open" channel - where all users are members by default. -2. Ability to delete a message previously sent -3. Ability to edit a message -4. Ability to send images and files by clicking on the file "plus" button -5. Ability to send images and files by dragging and dropping them into the chat interface -6. Image previews in the chat interface -7. Ability to download files from the chat interface -8. Styling improvements: dark mode for emoji picker, highlight for mentions in messages (@user), dark mode support for Quill mentions menu -9. General channel is created when app is installed. -10. Bug fix: empty messages cannot be sent -11. Bug fix: duplicate channel names cannot be created (added validation) -12. Bug fix: design issues fixed on the chat interface to make the chat messages responsive according to height of input. - -
- -#### What's not working (yet) - -Mobile app: -1. Channels cannot be created and channel details cannot be viewed -2. Members cannot be added to or removed from channels -3. Files and images cannot be sent. - -Moreover, the mobile app authentication needs to be updated to use Bearer tokens because of a cookie issue on iOS. The mobile app works on Android. - -Web app: -1. Improvements to be made on direct message listing. -2. Lazy loading and scroll to load for older messages. - -
## Installation @@ -167,9 +127,7 @@ bench get-app https://github.com/The-Commit-Company/Raven.git bench --site yoursite.name install-app raven ``` -Post this, you can access Raven on your Frappe site at the `/raven-app` endpoint (e.g. https://yoursite.com/raven-app). - -We plan to publish Raven to the [Frappe Cloud Marketplace](https://frappecloud.com/marketplace/apps) soon. +Post this, you can access Raven on your Frappe site at the `/raven` endpoint (e.g. https://yoursite.com/raven). ### Local development setup @@ -202,9 +160,8 @@ yarn dev We are currently working or will be working on the following features. Please head to our Github issues page and feel free to contribute: 1. Mobile app for Raven -2. Open-graph link previews -3. Push notifications -4. Integration service - allowing other applications to create bots and send messages. Some popular services we are looking at are [Github](https://github.com), [Linear](https://linear.app), [Sentry][https://sentry.io], [Frappe Desk][https://frappedesk.com]. +2. Push notifications +3. Integration service - allowing other applications to create bots and send messages. Some popular services we are looking at are [Github](https://github.com), [Linear](https://linear.app), [Sentry][https://sentry.io], [Frappe Desk][https://frappedesk.com].
diff --git a/package.json b/package.json index aaff0b19b..fd1ee4585 100644 --- a/package.json +++ b/package.json @@ -11,5 +11,5 @@ }, "keywords": [], "author": "", - "license": "ISC" + "license": "AGPL-3.0" } \ No newline at end of file diff --git a/raven-app/.env.production b/raven-app/.env.production index 5f80e0ea6..373b668f5 100644 --- a/raven-app/.env.production +++ b/raven-app/.env.production @@ -1 +1 @@ -VITE_BASE_NAME='raven_app' \ No newline at end of file +VITE_BASE_NAME='raven' \ No newline at end of file diff --git a/raven-app/package.json b/raven-app/package.json index b9e093014..4616d8564 100644 --- a/raven-app/package.json +++ b/raven-app/package.json @@ -5,9 +5,9 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build --base=/assets/raven/raven-app/ && yarn copy-html-entry", + "build": "vite build --base=/assets/raven/raven/ && yarn copy-html-entry", "preview": "vite preview", - "copy-html-entry": "cp ../raven/public/raven-app/index.html ../raven/www/raven_app.html" + "copy-html-entry": "cp ../raven/public/raven/index.html ../raven/www/raven.html" }, "dependencies": { "@chakra-ui/icons": "^2.0.17", @@ -45,4 +45,4 @@ "typescript": "^4.9.3", "vite": "^4.1.0" } -} +} \ No newline at end of file diff --git a/raven-app/vite.config.ts b/raven-app/vite.config.ts index b83c8a254..b59936641 100644 --- a/raven-app/vite.config.ts +++ b/raven-app/vite.config.ts @@ -16,7 +16,7 @@ export default defineConfig({ } }, build: { - outDir: '../raven/public/raven-app', + outDir: '../raven/public/raven', emptyOutDir: true, target: 'es2015', }, diff --git a/raven/__init__.py b/raven/__init__.py index b8023d8bc..1f356cc57 100644 --- a/raven/__init__.py +++ b/raven/__init__.py @@ -1 +1 @@ -__version__ = '0.0.1' +__version__ = '1.0.0' diff --git a/raven/hooks.py b/raven/hooks.py index 04ae8eb0f..492d49377 100644 --- a/raven/hooks.py +++ b/raven/hooks.py @@ -2,10 +2,10 @@ app_name = "raven" app_title = "Raven" -app_publisher = "Janhvi Patil" +app_publisher = "The Commit Company" app_description = "Messaging Application" -app_email = "janhvipatil716@gmail.com" -app_license = "MIT" +app_email = "support@thecommit.company" +app_license = "AGPLv3" # Includes in # ------------------ @@ -191,7 +191,7 @@ # ] website_route_rules = [ - {'from_route': '/raven_app/', 'to_route': 'raven_app'}, ] + {'from_route': '/raven/', 'to_route': 'raven'}, ] has_permission = { "Raven Channel": "raven.permissions.channel_has_permission", diff --git a/raven/raven/workspace/raven/raven.json b/raven/raven/workspace/raven/raven.json new file mode 100644 index 000000000..8395145ff --- /dev/null +++ b/raven/raven/workspace/raven/raven.json @@ -0,0 +1,76 @@ +{ + "charts": [], + "content": "[{\"id\":\"MKitHAnT4f\",\"type\":\"header\",\"data\":{\"text\":\"Raven\",\"col\":12}},{\"id\":\"_TmvmGAvy7\",\"type\":\"paragraph\",\"data\":{\"text\":\"Click here to visit the Raven app\",\"col\":12}},{\"id\":\"ZcawYU5brv\",\"type\":\"card\",\"data\":{\"card_name\":\"DocTypes\",\"col\":4}}]", + "creation": "2023-06-22 20:12:29.687295", + "docstatus": 0, + "doctype": "Workspace", + "for_user": "", + "hide_custom": 0, + "icon": "message-1", + "idx": 0, + "is_hidden": 0, + "label": "Raven", + "links": [ + { + "hidden": 0, + "is_query_report": 0, + "label": "DocTypes", + "link_count": 4, + "onboard": 0, + "type": "Card Break" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Channels", + "link_count": 0, + "link_to": "Raven Channel", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Members", + "link_count": 0, + "link_to": "Raven Channel Member", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Messages", + "link_count": 0, + "link_to": "Raven Message", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Message Reactions", + "link_count": 0, + "link_to": "Raven Message Reaction", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + } + ], + "modified": "2023-06-22 20:14:45.643069", + "modified_by": "Administrator", + "module": "Raven", + "name": "Raven", + "number_cards": [], + "owner": "Administrator", + "parent_page": "", + "public": 1, + "quick_lists": [], + "roles": [], + "sequence_id": 30.0, + "shortcuts": [], + "title": "Raven" +} \ No newline at end of file diff --git a/raven/raven_messaging/doctype/raven_message/raven_message.py b/raven/raven_messaging/doctype/raven_message/raven_message.py index f3a9200a3..4816eb5fe 100644 --- a/raven/raven_messaging/doctype/raven_message/raven_message.py +++ b/raven/raven_messaging/doctype/raven_message/raven_message.py @@ -111,9 +111,11 @@ def fetch_recent_files(channel_id): @frappe.whitelist() def get_last_channel(): - last_message = frappe.get_last_doc('Raven Message', { - 'owner': frappe.session.user - }) + last_message = None + if frappe.db.exists("Raven Message", {"owner": frappe.session.user}): + last_message = frappe.get_last_doc('Raven Message', { + 'owner': frappe.session.user + }) if last_message: return last_message.channel_id else: diff --git a/raven/www/raven_app.py b/raven/www/raven.py similarity index 100% rename from raven/www/raven_app.py rename to raven/www/raven.py diff --git a/raven/www/raven_app.html b/raven/www/raven_app.html deleted file mode 100644 index bc98c877a..000000000 --- a/raven/www/raven_app.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - Raven - - - - - -
- - - - - \ No newline at end of file diff --git a/setup.py b/setup.py index b9c0b47b3..ca816b010 100644 --- a/setup.py +++ b/setup.py @@ -10,8 +10,8 @@ name="raven", version=version, description="Messaging Application", - author="Janhvi Patil", - author_email="janhvipatil716@gmail.com", + author="The Commit Company", + author_email="support@thecommit.company", packages=find_packages(), zip_safe=False, include_package_data=True,