From af6fa4d1b88762ac08bee2323109014c5d0cd217 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Jun 2023 06:13:23 +0000 Subject: [PATCH 1/7] Upgrade to v0.8.6 --- conf/amd64.src | 4 ++-- conf/arm64.src | 4 ++-- conf/armhf.src | 4 ++-- conf/config.yaml | 19 ++++++++++++++----- manifest.json | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/conf/amd64.src b/conf/amd64.src index 3716081..9821286 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.5/mautrix-whatsapp-amd64 -SOURCE_SUM=2989419b6c8ce870189359a44a1642a22e6cc87d6344123622fa2d59d073a339 +SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.6/mautrix-whatsapp-amd64 +SOURCE_SUM=a9e3e1c920dbd5ba35a6a91209d267fa9a8f98ce43c81d56c5126e965fcd8eaa SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mautrix-whatsapp diff --git a/conf/arm64.src b/conf/arm64.src index 4296588..7fd7193 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.5/mautrix-whatsapp-arm64 -SOURCE_SUM=e9c34620f5748bac34f4d15d9e9088ecf8676288edc9460bf6245688eafd6367 +SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.6/mautrix-whatsapp-arm64 +SOURCE_SUM=dcac55fc3336a251ec6dc6f28b76199833505310f03ec526de5aee87852736aa SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mautrix-whatsapp diff --git a/conf/armhf.src b/conf/armhf.src index e63c3ca..bc1181d 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.5/mautrix-whatsapp-arm -SOURCE_SUM=6f664454fccabe023c6d7eb8ad85ed80ba7c5691605e16977cfc67ffed1a252a +SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.6/mautrix-whatsapp-arm +SOURCE_SUM=a76127e5e3ddd6ce99c578ad29a22a9b9609462c7a47dc8b9e2f6b4ab94f5396 SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mautrix-whatsapp diff --git a/conf/config.yaml b/conf/config.yaml index 0a9848e..7b755c1 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -15,6 +15,12 @@ homeserver: message_send_checkpoint_endpoint: null # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246? async_media: __ASYNC_MEDIA__ + # Should the bridge use a websocket for connecting to the homeserver? + # The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy, + # mautrix-asmux (deprecated), and hungryserv (proprietary). + websocket: false + # How often should the websocket be pinged? Pinging will be disabled if this is zero. + ping_interval_seconds: 0 # Application service host/registration related details. # Changing these values requires regeneration of the registration. appservice: @@ -91,7 +97,7 @@ bridge: # The following variables are also available, but will cause problems on multi-user instances: # {{.FullName}} - full name from contact list # {{.FirstName}} - first name from contact list - displayname_template: "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)" + displayname_template: "{{or .BusinessName .PushName .JID}} (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: __PERSONAL_FILTERING_SPACES__ @@ -397,6 +403,9 @@ bridge: # session before changing it. The Matrix spec recommends 100 as the # default. messages: 100 + # Disable rotating keys when a user's devices change? + # You should not enable this option unless you understand all the implications. + disable_device_change_key_rotation: false # Settings for provisioning API provisioning: # Prefix for the provisioning API paths. @@ -414,9 +423,9 @@ bridge: # domain - All users on that homeserver # mxid - Specific user permissions: - "__LISTRELAY__": relay - "__LISTUSER__": user - "__LISTADMIN__": 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 @@ -442,7 +451,7 @@ logging: format: pretty-colored - type: file format: json - filename: /var/log/__APP__/__APP__.log + filename: ./logs/mautrix-whatsapp.log max_size: 100 max_backups: 10 compress: true diff --git a/manifest.json b/manifest.json index 828a084..233694d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Matrix / Synapse puppeting bridge for WhatsApp", "fr": "Passerelle Matrix / Synapse pour WhatsApp" }, - "version": "0.8.5~ynh1", + "version": "0.8.6~ynh1", "url": "https://github.com/mautrix/whatsapp", "upstream": { "license": "AGPL-3.0-or-later", From 7b27de65a888a5ea844af54d19c6469692c4c3f6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 17 Jun 2023 06:13:29 +0000 Subject: [PATCH 2/7] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85cc47b..dbefc64 100644 --- a/README.md +++ b/README.md @@ -25,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.5~ynh1 +**Shipped version:** 0.8.6~ynh1 ## Disclaimers / important information ## List of known public services diff --git a/README_fr.md b/README_fr.md index c32deed..0fcbe0f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,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.5~ynh1 +**Version incluse :** 0.8.6~ynh1 ## Avertissements / informations importantes ## Liste de passerelles publiques From e910a265980bf70e5d99e38890bae26956b784d6 Mon Sep 17 00:00:00 2001 From: Dante Date: Tue, 20 Jun 2023 18:40:30 +0200 Subject: [PATCH 3/7] Fix logging filename config value --- .github/workflows/updater.sh | 2 +- conf/config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 029c141..4e85e56 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -148,7 +148,7 @@ yq -i '.bridge.encryption.require = "__ENCRYPTION_REQUIRE__"' $configFilePath yq -i 'with(.bridge.permissions ; . = { "__LISTRELAY__": "relay", "__LISTUSER__": "user", "__LISTADMIN__": "admin" } | ... style="double")' $configFilePath yq -i '.bridge.relay.enabled = "__ENABLE_RELAYBOT__"' $configFilePath yq -i '.bridge.relay.admin_only = "__ADMIN_ONLY__"' $configFilePath -yq -i '.logging.writers.filename = "/var/log/__APP__"' $configFilePath +yq -i '.logging.writers.filename = "/var/log/__APP__/__APP__.log"' $configFilePath yq -i '.logging.min_level = "__PRINT_LEVEL__"' $configFilePath #================================================= diff --git a/conf/config.yaml b/conf/config.yaml index 7b755c1..6c5e29a 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -451,7 +451,7 @@ logging: format: pretty-colored - type: file format: json - filename: ./logs/mautrix-whatsapp.log + filename: /var/log/__APP__/__APP__.log max_size: 100 max_backups: 10 compress: true From 652f0fafbbc103f10e5b036bab868d05fbf3a1a8 Mon Sep 17 00:00:00 2001 From: Dante Date: Tue, 20 Jun 2023 18:45:56 +0200 Subject: [PATCH 4/7] Fix logging min_level config panel value --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 27bff09..a691864 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -193,7 +193,7 @@ services = ["__APP__"] help = "Enable only if HomeServer supports MSC2409 (i.e. Synapse 1.22+). If enabled, you should disable bridge -> 'sync_with_custom_puppets'." bind = ":__FINALPATH__/config.yaml" - [advanced.appservice.print_level] + [advanced.appservice.min_level] ask = "Logging print level for Standard Output" type = "select" choices = ["debug", "info", "warn", "error", "fatal"] From fc86890caceb8a246efa62ecca953853b829f692 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jul 2023 06:16:48 +0000 Subject: [PATCH 5/7] Upgrade to v0.9.0 --- conf/amd64.src | 4 +- conf/arm64.src | 4 +- conf/armhf.src | 4 +- conf/config.yaml | 101 +++++++++++++++++++++-------------------------- manifest.json | 2 +- 5 files changed, 52 insertions(+), 63 deletions(-) diff --git a/conf/amd64.src b/conf/amd64.src index 9821286..05fc4c2 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.6/mautrix-whatsapp-amd64 -SOURCE_SUM=a9e3e1c920dbd5ba35a6a91209d267fa9a8f98ce43c81d56c5126e965fcd8eaa +SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.9.0/mautrix-whatsapp-amd64 +SOURCE_SUM=27b5d3ee0cada177207b662072b42923956e38a9c10c4e167eeca17881f3bffb SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mautrix-whatsapp diff --git a/conf/arm64.src b/conf/arm64.src index 7fd7193..cd25bd8 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.6/mautrix-whatsapp-arm64 -SOURCE_SUM=dcac55fc3336a251ec6dc6f28b76199833505310f03ec526de5aee87852736aa +SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.9.0/mautrix-whatsapp-arm64 +SOURCE_SUM=dc475a2af45988d6d428af18c5f2a30da24930201e0e667a0b749a198a3bd02d SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mautrix-whatsapp diff --git a/conf/armhf.src b/conf/armhf.src index bc1181d..c950428 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.8.6/mautrix-whatsapp-arm -SOURCE_SUM=a76127e5e3ddd6ce99c578ad29a22a9b9609462c7a47dc8b9e2f6b4ab94f5396 +SOURCE_URL=https://github.com/mautrix/whatsapp/releases/download/v0.9.0/mautrix-whatsapp-arm +SOURCE_SUM=22c28d17ec868c4579e8ed64e092b0947a268c82ed9714d3ae45ace05b477fd8 SOURCE_SUM_PRG=sha256sum SOURCE_IN_SUBDIR=false SOURCE_FILENAME=mautrix-whatsapp diff --git a/conf/config.yaml b/conf/config.yaml index 6c5e29a..594d09f 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -83,7 +83,7 @@ whatsapp: 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 + # List of valid browser names: https://github.com/tulir/whatsmeow/blob/efc632c008604016ddde63bfcfca8de4e5304da9/binary/proto/def.proto#L43-L64 browser_name: __BROWSER_NAME__ # Bridge config bridge: @@ -114,20 +114,14 @@ bridge: portal_message_buffer: 128 # Settings for handling history sync payloads. history_sync: - # Enable backfilling history sync payloads from WhatsApp using batch sending? - # This requires a server with MSC2716 support, which is currently an experimental feature in synapse. - # It can be enabled by setting experimental_features -> msc2716_enabled to true in homeserver.yaml. - # Note that prior to Synapse 1.49, there were some bugs with the implementation, especially if using event persistence workers. - # There are also still some issues in Synapse's federation implementation. - backfill: false - # Should the bridge create portals for chats in the history sync payload? - # This has no effect unless backfill is enabled. - create_portals: true - # Use double puppets for backfilling? - # In order to use this, the double puppets must be in the appservice's user ID namespace - # (because the bridge can't use the double puppet access token with batch sending). - # This only affects double puppets on the local server, double puppets on other servers will never be used. - double_puppet_backfill: false + # Enable backfilling history sync payloads from WhatsApp? + backfill: true + # The maximum number of initial conversations that should be synced. + # Other conversations will be backfilled on demand when receiving a message or when initiating a direct chat. + max_initial_conversations: -1 + # Maximum number of messages to backfill in each conversation. + # Set to -1 to disable limit. + message_count: 50 # 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 @@ -141,51 +135,42 @@ bridge: 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. - # These settings determine if the media requests should be done - # automatically during or after backfill. - media_requests: - # Should expired media be automatically requested from the server as - # part of the backfill process? - auto_request_media: true - # Whether to request the media immediately after the media message - # is backfilled ("immediate") or at a specific time of the day - # ("local_time"). - request_method: immediate - # If request_method is "local_time", what time should the requests - # be sent (in minutes after midnight)? - request_local_time: 120 - # The maximum number of initial conversations that should be synced. - # Other conversations will be backfilled on demand when the start PM - # provisioning endpoint is used or when a message comes in from that - # chat. - max_initial_conversations: -1 - # If this value is greater than 0, then if the conversation's last - # message was more than this number of hours ago, then the conversation - # will automatically be marked it as read. - # Conversations that have a last message that is less than this number - # of hours ago will have their unread status synced from WhatsApp. + # If this value is greater than 0, then if the conversation's last message was more than + # this number of hours ago, then the conversation will automatically be marked it as read. + # Conversations that have a last message that is less than this number of hours ago will + # have their unread status synced from WhatsApp. unread_hours_threshold: 0 - # Settings for immediate backfills. These backfills should generally be - # small and their main purpose is to populate each of the initial chats - # (as configured by max_initial_conversations) with a few messages so - # that you can continue conversations without loosing context. + ############################################################################### + # The settings below are only applicable for backfilling using batch sending, # + # which is no longer supported in Synapse. # + ############################################################################### + + # 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. + # These settings determine if the media requests should be done automatically during or after backfill. + media_requests: + # Should expired media be automatically requested from the server as part of the backfill process? + auto_request_media: true + # Whether to request the media immediately after the media message is backfilled ("immediate") + # or at a specific time of the day ("local_time"). + request_method: immediate + # If request_method is "local_time", what time should the requests be sent (in minutes after midnight)? + request_local_time: 120 + # Settings for immediate backfills. These backfills should generally be small and their main purpose is + # to populate each of the initial chats (as configured by max_initial_conversations) with a few messages + # so that you can continue conversations without losing context. immediate: - # The number of concurrent backfill workers to create for immediate - # backfills. Note that using more than one worker could cause the - # room list to jump around since there are no guarantees about the - # order in which the backfills will complete. + # The number of concurrent backfill workers to create for immediate backfills. + # Note that using more than one worker could cause the room list to jump around + # since there are no guarantees about the order in which the backfills will complete. worker_count: 1 # The maximum number of events to backfill initially. max_events: 10 - # Settings for deferred backfills. The purpose of these backfills are - # to fill in the rest of the chat history that was not covered by the - # immediate backfills. These backfills generally should happen at a - # slower pace so as not to overload the homeserver. - # Each deferred backfill config should define a "stage" of backfill - # (i.e. the last week of messages). The fields are as follows: + # Settings for deferred backfills. The purpose of these backfills are to fill in the rest of + # the chat history that was not covered by the immediate backfills. + # These backfills generally should happen at a slower pace so as not to overload the homeserver. + # Each deferred backfill config should define a "stage" of backfill (i.e. the last week of messages). + # The fields are as follows: # - start_days_ago: the number of days ago to start backfilling from. # To indicate the start of time, use -1. For example, for a week ago, use 7. # - max_batch_events: the number of events to send per batch. @@ -369,6 +354,10 @@ bridge: delete_on_device_delete: false # Periodically delete megolm sessions when 2x max_age has passed since receiving the session. periodically_delete_expired: false + # Delete inbound megolm sessions that don't have the received_at field used for + # automatic ratcheting and expired session deletion. This is meant as a migration + # to delete old keys prior to the bridge update. + delete_outdated_inbound: false # What level of device verification should be required from users? # # Valid levels: @@ -451,7 +440,7 @@ logging: format: pretty-colored - type: file format: json - filename: /var/log/__APP__/__APP__.log + filename: ./logs/mautrix-whatsapp.log max_size: 100 max_backups: 10 compress: true diff --git a/manifest.json b/manifest.json index 233694d..4402fa1 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Matrix / Synapse puppeting bridge for WhatsApp", "fr": "Passerelle Matrix / Synapse pour WhatsApp" }, - "version": "0.8.6~ynh1", + "version": "0.9.0~ynh1", "url": "https://github.com/mautrix/whatsapp", "upstream": { "license": "AGPL-3.0-or-later", From 94a4d6317f3119f9b16495001295669538dcbf16 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jul 2023 06:16:53 +0000 Subject: [PATCH 6/7] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbefc64..dcff677 100644 --- a/README.md +++ b/README.md @@ -25,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.6~ynh1 +**Shipped version:** 0.9.0~ynh1 ## Disclaimers / important information ## List of known public services diff --git a/README_fr.md b/README_fr.md index 0fcbe0f..b3e6656 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,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.6~ynh1 +**Version incluse :** 0.9.0~ynh1 ## Avertissements / informations importantes ## Liste de passerelles publiques From 8f603942e0dfe7029382478f2dd7bb9857cca6a9 Mon Sep 17 00:00:00 2001 From: Dante Date: Mon, 17 Jul 2023 09:21:40 +0100 Subject: [PATCH 7/7] Fix config logging wrong value --- conf/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.yaml b/conf/config.yaml index 594d09f..98584da 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -440,7 +440,7 @@ logging: format: pretty-colored - type: file format: json - filename: ./logs/mautrix-whatsapp.log + filename: /var/log/__APP__/__APP__.log max_size: 100 max_backups: 10 compress: true