bluebubblesapp / bluebubbles-server Goto Github PK
View Code? Open in Web Editor NEWServer for forwarding iMessages to clients within the BlueBubbles App ecosystem
Home Page: https://bluebubbles.app
License: Apache License 2.0
Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
Home Page: https://bluebubbles.app
License: Apache License 2.0
So that there is no jagged white outline
I want to add the BlueBubbles App to the MacOS toolbar (at the top right). We have icons located in the /icons
folder that we can use for it. I want to basically allow the user to do a few things via the dropdown.
Client Authenticated Successfully
7/24/2020, 1:43:54 PM [LOG] -> Client E1X7d7Nq78zCNU-LAADK disconnected!
7/24/2020, 1:57:18 PM [DEBUG] -> t=2020-07-24T13:57:18-0700 lvl=eror msg="session closed, starting reconnect loop" obj=csess id=431cd9d9a3b1 err="read EOF from remote peer"
7/24/2020, 1:57:18 PM [LOG] -> Ngrok status: closed
7/24/2020, 1:57:18 PM [DEBUG] -> t=2020-07-24T13:57:18-0700 lvl=info msg=start pg=/api/tunnels/112ccbd3-b596-416a-af05-ec7e40da6eea id=7bc0ee55e3140995
7/24/2020, 1:57:18 PM [DEBUG] -> t=2020-07-24T13:57:18-0700 lvl=eror msg="internal error" pg=/api/tunnels/112ccbd3-b596-416a-af05-ec7e40da6eea id=7bc0ee55e3140995 err="remote gone away"
7/24/2020, 1:57:18 PM [DEBUG] -> t=2020-07-24T13:57:18-0700 lvl=info msg=end pg=/api/tunnels/112ccbd3-b596-416a-af05-ec7e40da6eea id=7bc0ee55e3140995 status=500 dur=1.057224ms
7/24/2020, 1:57:18 PM [ERROR] -> Failed to restart ngrok! 500 - "{"error_code":107,"status_code":500,"msg":"internal error","details":{"err":"remote gone away"}}\n"
7/24/2020, 1:57:18 PM [DEBUG] -> t=2020-07-24T13:57:18-0700 lvl=info msg=start pg="/api/tunnels/112ccbd3-b596-416a-af05-ec7e40da6eea (http)" id=531de83760e7e3b2
t=2020-07-24T13:57:18-0700 lvl=eror msg="internal error" pg="/api/tunnels/112ccbd3-b596-416a-af05-ec7e40da6eea (http)" id=531de83760e7e3b2 err="remote gone away"
t=2020-07-24T13:57:18-0700 lvl=info msg=end pg="/api/tunnels/112ccbd3-b596-416a-af05-ec7e40da6eea (http)" id=531de83760e7e3b2 status=500 dur=202.594µs
7/24/2020, 1:57:19 PM [DEBUG] -> t=2020-07-24T13:57:19-0700 lvl=info msg="tunnel session started" obj=tunnels.session
t=2020-07-24T13:57:19-0700 lvl=info msg="client session established" obj=csess id=431cd9d9a3b1
7/24/2020, 1:57:19 PM [LOG] -> Ngrok status: connected
A user may want to use their own port forwarding instead of ngrok. We should allow this as they may feel ngrok is a security concern.
Add a way to disable ngrok via the config page. This should be stored in the server's configuration database and should default to "enabled" ("1" in the DB)
Aka, pass a callback param
Checkout this project and see if you can model some things after it: https://github.com/electron-react-boilerplate/electron-react-boilerplate/blob/master/package.json
Maybe also check out Electron Forge? https://www.electronforge.io/
https://www.npmjs.com/package/node-mac-permissions
This can be implemented in 1 of 2 areas:
The benefit of the first one is hopefully they'll allow permissions before we try to make any DB connections. The benefit of the second one, is it's more of a tutorial "workflow" that gives the user understanding of why we need the access
For some reason, alerts in the UI sometimes don't have any data (message, type, or date). I'm not entirely sure why this happens, and it's not easy to reproduce.
The main time I've seen this happen is upon initial setup of the app. Possibly when something fails to connect via the setup process due to network issues, full disk access issues, etc
This will be used to tell the app info about the server and show/hide features accordingly
In order to move processing off of the clients, we can move processing to the server.
For instance, whenever the app is opened, instead of looping over all the chats and requesting new messages since "x" date, we instead ask the server one time, which chats need to be updated since "x" date. The server will return the chat GUIDs of the chats needing updates. Then the client can ask for messages for only those.
Another alternative would just be to have the client ask for all messages that we're created after x date. This would make the client only to make 1 request. This work would be done on the client side, not the server side.
Both of these solutions would greatly reduce battery and CPU usage on the clients
Right now the navbar Header is plain blue with just a title. We should revamp it to look nicer. Maybe add an icon, change the color, add a gradiant?
We should have a way to create automated builds of the server when there have been updates. This way we don't have to manually build the server and upload it each time we create an update. This automated build process can also probably be leveraged for #18 to help with automated updates.
Status text contains: lvl=crit msg="command failed"
Instead of sending a "message" via FCM, send an actual notification via FCM
Add in a button to manually restart the server. Not the whole app, just the server's connections to things such as the databases, ngrok, FCM, the listeners, etc. Make sure to close the connections first. This can help with debuggjng.
Caffeinate is a "app" that is already installed on all MacOS devices. It allows you to keep your mac awake until the command is terminated (the command never returns, I don't think). Many of our users (or at least AirMessage users) use apps such as "Jolt" from the Mac AppStore (or similar) to keep their mac awake at all times. It would be awesome to look into embedding this into the app so the user won't need to download additional 3rd party apps.
Caffeinate Documentation: https://ss64.com/osx/caffeinate.html
In addition to just adding it, I want the user to be able to configure it:
The server should have a way of detecting that there is a new release, and allowing a user to update the app. Currently there is a system in place that detects if there is a new version and directs a user to the github releases page. Maybe we can automate this farther?
Should be a tutorial page with 2 drop zones, and links to the install/faq docs
By default, we generate a random guid for authentication via the socket. That GUID is usually transferred via the QR code. However, since not all clients will be able to use the QR code, we want to give users the ability to set their own passphrase and essentially overwrite that default guid.
That passphrase can then be used to connect and authenticate via other clients such as the desktop app
Create a config item in the UI to display the current passphrase (guid), and allow the user to change it
Basically, create a service that can check for updates every 6 hours, 12 hours, or 24 hours. The "service" will check the releases page of github, or a specific file in the repo, containing the most recent version. Then ask to update. It will not auto-download or install
Working code, need to add looping through the devices and sending to the devices individually
async sendNotification(devices: string[], data: any): Promise<admin.messaging.MessagingDevicesResponse> {
if (!this.refresh()) return null;
// Build out the notification message
console.log("data: " + JSON.stringify(data));
const msg: admin.messaging.DataMessagePayload = { data };
const options: admin.messaging.MessagingOptions = { priority: 'high' };
const res = await this.app.messaging().sendToDevice(devices[0], msg, options);
return res;
}
We weren't able to have a popup to auto allow the use of the iMessage DB, only redirect them to system preferences. We need to improve the workflow of the "1st time opening" the app. Here's what I want to do:
node-mac-permissions
)
node-mac-permissions
module to open system preferences
You can reset the tutorial flag in the DB. The config DB (in dev mode) is located here: ~/Library/Application\ Support/Electron/config.db
After adding the new tutorial page, you'll need to add it to the stepper config list: https://github.com/BlueBubblesApp/BlueBubbles-Server/blob/zach/dev/src/renderer/views/Tutorial/index.tsx#L16
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.