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

Add config panel and upgrade to 0.8.1 #87

Merged
merged 51 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
dac5495
Add config panel with few config options and user management
thardev Oct 3, 2022
b4fb086
Better handling of special chars like *
thardev Oct 4, 2022
50ce052
Merge branch 'testing' into expose-config-panel
thardev Nov 16, 2022
f0b9772
WIP expose more config options
thardev Dec 9, 2022
f58912b
add __foobar__ settings
Gredin67 Jan 5, 2023
80bff15
unique setting name
Gredin67 Jan 5, 2023
d8dcdfa
init settings install upgrade
Gredin67 Jan 5, 2023
faa5d5c
improve config panel structure
Gredin67 Jan 6, 2023
a25dcb7
typo and small clean
Gredin67 Jan 6, 2023
f151a35
add bind to match settings
Gredin67 Jan 6, 2023
83cb70b
init tags listuser,admin,relay
Gredin67 Jan 10, 2023
a690e9b
try apply config panel
Gredin67 Jan 11, 2023
cfdfa99
Update upgrade
Gredin67 Jan 11, 2023
d427bd3
Update upgrade
Gredin67 Jan 12, 2023
98391bd
Fix set role for command line calls
thardev Jan 16, 2023
e032f14
Auto-update README
yunohost-bot Jan 16, 2023
5849037
Merge branch 'testing' into expose-config-panel
thardev Jan 16, 2023
19b3502
merge conflict
Gredin67 Jan 19, 2023
d0a7cf7
refactor config_panel structure
Gredin67 Jan 19, 2023
2440fac
try improve permission mgmt
Gredin67 Jan 19, 2023
25b0f50
correct reset after upgrade
Gredin67 Jan 19, 2023
b99c05e
try
Gredin67 Jan 19, 2023
b0d3c95
finalize
Gredin67 Jan 19, 2023
dc4efb9
correct upgrade permissions
Gredin67 Jan 19, 2023
f36775c
set list$role in app_setting
Gredin67 Jan 19, 2023
4042f22
winner?
Gredin67 Jan 19, 2023
59154fc
this is the end?
Gredin67 Jan 19, 2023
82483c0
error listrelay=""
Gredin67 Jan 19, 2023
3a556d6
yaml mapping key "" already
Gredin67 Jan 19, 2023
745a07d
again
Gredin67 Jan 19, 2023
4cae1e2
order matters?
Gredin67 Jan 19, 2023
05f9699
should work...
Gredin67 Jan 19, 2023
dbdbff3
again
Gredin67 Jan 19, 2023
bf7d293
alltogether
Gredin67 Jan 19, 2023
354343c
ugly
Gredin67 Jan 19, 2023
6e0cd33
typo
Gredin67 Jan 19, 2023
e7dbf77
typo
Gredin67 Jan 19, 2023
c4a9a5e
-v $listrelay
Gredin67 Jan 20, 2023
b6cd72b
typo
Gredin67 Jan 20, 2023
763f82c
correct db missing
Gredin67 Jan 20, 2023
febe7ba
Fix translation typo
MayeulC Jan 20, 2023
07d4adb
config set after service start
Gredin67 Jan 30, 2023
8a927fb
Auto-update README
yunohost-bot Jan 30, 2023
56cacc1
Merge pull request #74 from YunoHost-Apps/expose-config-panel
thardev Feb 4, 2023
e1fb767
Upgrade to version 0.8.1 (#86)
github-actions[bot] Feb 6, 2023
95c125f
check upgrade from 0.4.0 and 0.6.1
Gredin67 Feb 6, 2023
8e4713f
config setters in common for upgrade
Gredin67 Feb 9, 2023
5194006
[autopatch] Upgrade auto-updater
tituspijean Feb 23, 2023
2bb7fcf
Auto-update README
yunohost-bot Feb 23, 2023
35b2cfc
Merge pull request #89 from YunoHost-Apps/upgrade-auto-updater
thardev Feb 24, 2023
16208c1
Fix upgrade when restoring permissions
thardev Feb 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Fetch the source code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run the updater script
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Create Pull Request
id: cpr
if: ${{ env.PROCEED == 'true' }}
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update to version ${{ env.VERSION }}
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ It shall NOT be edited by hand.

# Matrix-WhatsApp bridge for YunoHost

[![Integration level](https://dash.yunohost.org/integration/mautrix_whatsapp.svg)](https://dash.yunohost.org/appci/app/mautrix_whatsapp) ![Working status](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/mautrix_whatsapp.svg)](https://dash.yunohost.org/appci/app/mautrix_whatsapp) ![Working status](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.maintain.svg)

[![Install Matrix-WhatsApp bridge with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautrix_whatsapp)

*[Lire ce readme en français.](./README_fr.md)*
Expand All @@ -24,7 +25,7 @@ Therefore, [Synapse for YunoHost](https://github.com/YunoHost-Apps/synapse_ynh)
** Attention: always backup and restore the Yunohost matrix_synapse et mautrix_whatsapp apps together!**


**Shipped version:** 0.8.0~ynh1
**Shipped version:** 0.8.1~ynh1
## Disclaimers / important information

## List of known public services
Expand Down
5 changes: 3 additions & 2 deletions README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ It shall NOT be edited by hand.

# Matrix-WhatsApp bridge pour YunoHost

[![Niveau d’intégration](https://dash.yunohost.org/integration/mautrix_whatsapp.svg)](https://dash.yunohost.org/appci/app/mautrix_whatsapp) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.maintain.svg)
[![Niveau d’intégration](https://dash.yunohost.org/integration/mautrix_whatsapp.svg)](https://dash.yunohost.org/appci/app/mautrix_whatsapp) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mautrix_whatsapp.maintain.svg)

[![Installer Matrix-WhatsApp bridge avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautrix_whatsapp)

*[Read this readme in english.](./README.md)*
Expand All @@ -24,7 +25,7 @@ C'est pourquoi [Synapse for YunoHost](https://github.com/YunoHost-Apps/synapse_y
** Attention : sauvegardez et restaurez toujours les deux applications Yunohost matrix_synapse et mautrix_whatsapp en même temps!**


**Version incluse :** 0.8.0~ynh1
**Version incluse :** 0.8.1~ynh1
## Avertissements / informations importantes

## Liste de passerelles publiques
Expand Down
16 changes: 8 additions & 8 deletions check_process
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
setup_private=0
setup_public=0
upgrade=1
# 0.3.0
upgrade=1 from_commit=42df5b910927283241e185dcb8a62089adeb9c85
# 0.2.4
upgrade=1 from_commit=23cd51919e2b09865256a21214865d798bd843f6
# 0.4.0
upgrade=1 from_commit=717b32f454819c1bb936152c69d9693d34434741
# 0.6.1
upgrade=1 from_commit=fdd1e0ff652ae47b5e3c62477eea678c465659cf
backup_restore=1
multi_instance=1
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=42df5b910927283241e185dcb8a62089adeb9c85
name=0.3.0
; commit=23cd51919e2b09865256a21214865d798bd843f6
name=0.2.4
; commit=717b32f454819c1bb936152c69d9693d34434741
name=0.4.0
; commit=fdd1e0ff652ae47b5e3c62477eea678c465659cf
name=0.6.1
4 changes: 2 additions & 2 deletions conf/amd64.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.0/mautrix-whatsapp-amd64
SOURCE_SUM=b7fcef1d665c08fb3fd0c24f65ab179aeef24d1558ef539374887f635bcd7c0e
SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.1/mautrix-whatsapp-amd64
SOURCE_SUM=d50af9a4c65593bff3bb3a10382567505cde79929856304f35ae083066955d55
SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=mautrix-whatsapp
Expand Down
4 changes: 2 additions & 2 deletions conf/arm64.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.0/mautrix-whatsapp-arm64
SOURCE_SUM=389f126bb25ad0d8173a761f59a731a351eb02f1d95478cc5e3e2af1ff97b1c3
SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.1/mautrix-whatsapp-arm64
SOURCE_SUM=49e1b5308fd8b90e0871b27aa2febc324fbd78c175815312865b54102d04c966
SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=mautrix-whatsapp
Expand Down
4 changes: 2 additions & 2 deletions conf/armhf.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.0/mautrix-whatsapp-arm
SOURCE_SUM=5ebe0488106ed1377a76380639a41eca473eafb3b8f24396005a2999a350de46
SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.1/mautrix-whatsapp-arm
SOURCE_SUM=5f734a40793fc7223b6e15d781f02fae222507c125d12995a85bbb79e1e4370d
SOURCE_SUM_PRG=sha256sum
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=mautrix-whatsapp
Expand Down
54 changes: 31 additions & 23 deletions conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ homeserver:
# Endpoint for reporting per-message status.
message_send_checkpoint_endpoint: null
# Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
async_media: false
async_media: __ASYNC_MEDIA__

# Application service host/registration related details.
# Changing these values requires regeneration of the registration.
Expand Down Expand Up @@ -56,13 +56,13 @@ appservice:
username: __BOTNAME__
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
# to leave display name/avatar as-is.
displayname: WhatsApp bridge bot
avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
displayname: __DISPLAYNAME__
avatar: __AVATAR__

# Whether or not to receive ephemeral events via appservice transactions.
# Requires MSC2409 support (i.e. Synapse 1.22+).
# You should disable bridge -> sync_with_custom_puppets when this is enabled.
ephemeral_events: true
ephemeral_events: __EPHEMERAL_EVENTS__

# Should incoming events be handled asynchronously?
# This may be necessary for large public instances with lots of messages going through.
Expand All @@ -79,24 +79,24 @@ segment_key: null
# Prometheus config.
metrics:
# Enable prometheus metrics?
enabled: false
enabled: __ENABLE_METRICS__
# IP and port where the metrics listener should be. The path is always /metrics
listen: 127.0.0.1:8001
listen: __LISTEN_PORT__

# Config for things that are directly sent to WhatsApp.
whatsapp:
# Device name that's shown in the "WhatsApp Web" section in the mobile app.
os_name: Mautrix-WhatsApp bridge
os_name: __OS_NAME__
# Browser name that determines the logo shown in the mobile app.
# Must be "unknown" for a generic icon or a valid browser name if you want a specific icon.
# List of valid browser names: https://github.com/tulir/whatsmeow/blob/8b34d886d543b72e5f4699cf5b2797f68d598f78/binary/proto/def.proto#L38-L51
browser_name: unknown
browser_name: __BROWSER_NAME__

# Bridge config
bridge:
# Localpart template of MXIDs for WhatsApp users.
# {{.}} is replaced with the phone number of the WhatsApp user.
username_template: whatsapp_{{.}}
username_template: __USERNAME_TEMPLATE__
# Displayname template for WhatsApp users.
# {{.PushName}} - nickname set by the WhatsApp user
# {{.BusinessName}} - validated WhatsApp business name
Expand All @@ -107,9 +107,9 @@ bridge:
displayname_template: "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"
# Should the bridge create a space for each logged-in user and add bridged rooms to it?
# Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
personal_filtering_spaces: false
personal_filtering_spaces: __PERSONAL_FILTERING_SPACES__
# Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?
delivery_receipts: false
delivery_receipts: __DELIVERY_RECEIPTS__
# Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
message_status_events: false
# Whether the bridge should send error notices via m.notice events when a message fails to bridge.
Expand Down Expand Up @@ -137,6 +137,16 @@ bridge:
# Should the bridge request a full sync from the phone when logging in?
# This bumps the size of history syncs from 3 months to 1 year.
request_full_sync: false
# Configuration parameters that are sent to the phone along with the request full sync flag.
# By default (when the values are null or 0), the config isn't sent at all.
full_sync_config:
# Number of days of history to request.
# The limit seems to be around 3 years, but using higher values doesn't break.
days_limit: null
# This is presumably the maximum size of the transferred history sync blob, which may affect what the phone includes in the blob.
size_mb_limit: null
# This is presumably the local storage quota, which may affect what the phone includes in the history sync blob.
storage_quota_mb: null
# Settings for media requests. If the media expired, then it will not
# be on the WA servers.
# Media can always be requested by reacting with the ♻️ (recycle) emoji.
Expand Down Expand Up @@ -226,7 +236,7 @@ bridge:
# Send the presence as "available" to whatsapp when users start typing on a portal.
# This works as a workaround for homeservers that do not support presence, and allows
# users to see when the whatsapp user on the other side is typing during a conversation.
send_presence_on_typing: false
send_presence_on_typing: __SEND_PRESENCE_ON_TYPING__
# Should the bridge always send "active" delivery receipts (two gray ticks on WhatsApp)
# even if the user isn't marked as online (e.g. when presence bridging isn't enabled)?
#
Expand Down Expand Up @@ -298,7 +308,7 @@ bridge:
# Should the bridge detect URLs in outgoing messages, ask the homeserver to generate a preview,
# and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews`
# key in the event content even if this is disabled.
url_previews: false
url_previews: __URL_PREVIEWS__
# Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
# This is currently not supported in most clients.
caption_in_message: false
Expand Down Expand Up @@ -342,11 +352,11 @@ bridge:
# Default to encryption, force-enable encryption in all portals the bridge creates
# This will cause the bridge bot to be in private chats for the encryption to work properly.
# It is recommended to also set private_chat_portal_meta to true when using this.
default: false
default: __ENCRYPTION_DEFAULT__
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
appservice: false
# Require encryption, drop any unencrypted messages.
require: false
require: __ENCRYPTION_REQUIRE__
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
# You must use a client that supports requesting keys from other users to use this feature.
allow_key_sharing: false
Expand Down Expand Up @@ -403,20 +413,18 @@ bridge:
# domain - All users on that homeserver
# mxid - Specific user
permissions:
"*": relay
#"example.com": user
"__BOTUSERS__": user
#"@admin:example.com": admin
"__BOTADMIN__": admin
"__LISTRELAY__": relay
"__LISTUSER__": user
"__LISTADMIN__": admin

# Settings for relay mode
relay:
# Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
# authenticated user into a relaybot for that chat.
#enabled: false
enabled: true
enabled: __ENABLE_RELAYBOT__
# Should only admins be allowed to set themselves as relay users?
admin_only: true
admin_only: __ADMIN_ONLY__
# The formats to use when sending messages to WhatsApp via the relaybot.
message_formats:
m.text: "<b>{{ .Sender.Displayname }}</b>: {{ .Message }}"
Expand Down Expand Up @@ -445,4 +453,4 @@ logging:
timestamp_format: "Jan _2, 2006 15:04:05"
# Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file.
# Options: debug, info, warn, error, fatal
print_level: INFO
print_level: __PRINT_LEVEL__
Loading