-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #15 Two big upstream changes: * Molly merged unified push into the main app! No more "UP flavored app." * Mollysocket introduced VAPID support with a new QR code workflow. This adjusts docs and adds some scripts to adapt to these changes. Thanks @p1gp1g for your help. --------- Co-authored-by: sim <[email protected]>
- Loading branch information
Showing
10 changed files
with
131 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
fly.toml | ||
fly.toml.old |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,41 @@ | ||
launch: fly.toml | ||
flyctl launch --copy-config --no-public-ips --yes | ||
@flyctl launch --copy-config --no-public-ips --yes | ||
.PHONY: launch | ||
|
||
deploy: | ||
flyctl deploy | ||
@flyctl deploy | ||
.PHONY: deploy | ||
|
||
ssh: | ||
flyctl ssh console | ||
@flyctl ssh console | ||
.PHONY: ssh | ||
|
||
qr: | ||
@# if your terminal background is dark: | ||
@flyctl ssh console --command "qr.sh" | ||
.PHONY: qr | ||
|
||
qr-invert: | ||
@# if your terminal background is light: | ||
@flyctl ssh console --command "mollysocket qr airgapped" | ||
.PHONY: qr-invert | ||
|
||
restart: | ||
@flyctl scale count 0 --process-group worker --yes | ||
@flyctl scale count 1 --process-group worker --yes | ||
.PHONY: restart | ||
|
||
status: | ||
flyctl status | ||
@flyctl status | ||
.PHONY: status | ||
|
||
logs: | ||
flyctl logs --no-tail | ||
@flyctl logs --no-tail | ||
.PHONY: logs | ||
|
||
release: | ||
@gh release create --generate-notes --draft | ||
.PHONY: release | ||
|
||
fly.toml: | ||
cp fly.template.toml fly.toml | ||
@cp fly.template.toml fly.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
gen_vapid_key() { | ||
echo "Generating VAPID key..." | ||
mollysocket vapid gen > "${MOLLY_VAPID_KEY_FILE}" | ||
} | ||
|
||
main() { | ||
test -f "${MOLLY_VAPID_KEY_FILE}" || gen_vapid_key | ||
"${@}" | ||
} | ||
|
||
main "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
RESET='\033[0m' | ||
BLACK_FOREGROUND='\033[47m' | ||
WHITE_BACKGROUND='\033[0;30m' | ||
|
||
main() { | ||
echo -e " | ||
${WHITE_BACKGROUND}${BLACK_FOREGROUND} | ||
$(mollysocket qr airgapped) | ||
${RESET} | ||
" | ||
} | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
## Legacy Molly-UP to Molly-FOSS migration notes | ||
|
||
Good news! This UnifiedPush "flavor" of Molly [is no longer required](https://github.com/mollyim/mollyim-android-unifiedpush/releases/tag/v7.23.1-1.up1). | ||
UnifiedPush support has been merged into the main Molly-FOSS app. | ||
|
||
**There will be no more updates for the legacy app.** To keep receiving updates, you'll need to | ||
migrate to the main Molly-FOSS app. | ||
|
||
Additionally, a new version of [MollySocket](https://github.com/mollyim/mollysocket) has been | ||
released with a slightly different workflow for getting set up. I recommend that you: | ||
|
||
1. [Create a new instance of MollySocket](#create-a-new-instance-of-mollysocket) | ||
2. [Migrate your Android app from the legacy version to Molly-FOSS](#migrating-to-molly-foss) | ||
3. [Restore MollySocket push notifications](#restore-mollysocket-push-notifications) | ||
3. [Destroy the old instance of MollySocket](#destroy-the-old-instance-of-mollysocket) | ||
|
||
### Create a new instance of MollySocket | ||
|
||
Open this repository in a terminal and run: | ||
|
||
```bash | ||
mv fly.toml fly.toml.old | ||
make launch | ||
``` | ||
|
||
Congratulations, you should now have a second instance of MollySocket running in a new Fly app. | ||
|
||
### Migrating to Molly-FOSS | ||
|
||
1. [Install Molly-FOSS on your phone](https://molly.im/download/fdroid/). _Don't uninstall the old | ||
Molly-UP app yet._ | ||
2. In the old Molly app, go to Chat settings and scroll down to the bottom to _Chat backups_. Click | ||
that and generate a new backup. Remember the file path where you saved the backup. | ||
3. Now go to Android's app settings page and _Disable_ the old Molly app. Don't uninstall it yet, | ||
just in case. You can uninstall it later when you're all finished and everything is working. | ||
4. Open up the new Molly-FOSS app. As you go through the welcome screens, you'll see an option to | ||
restore from a backup. Do that. | ||
|
||
When the new app is running correctly, you'll need to Restore push notifications. | ||
|
||
### Restore MollySocket push notifications | ||
|
||
Go through the steps in the instructions starting at | ||
[step 5: Setup the Molly app for push notifications](HOWTO.md#setup-the-molly-app-for-push-notifications). | ||
|
||
_Recommended: Let it run for a while to make sure you continue receiving push notifications._ | ||
|
||
### Destroy the old instance of MollySocket | ||
|
||
1. [Login to fly.io](https://fly.io/app/sign-in) | ||
2. Click on the old MollySocket app | ||
3. Go to Settings | ||
4. Click _Delete app_. | ||
|
||
Now is also probably a good time to fully uninstall the old Molly-UP app from your phone. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters