From 7cfb3de9300dbe26cbc4f82161177b3ff1ab113b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 27 Dec 2023 08:36:07 +0100 Subject: [PATCH] Allow configuring device name of bridges via --param --- bridgeconfig/gmessages.tpl.yaml | 2 +- bridgeconfig/imessagego.tpl.yaml | 3 +++ bridgeconfig/telegram.tpl.yaml | 2 +- bridgeconfig/whatsapp.tpl.yaml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bridgeconfig/gmessages.tpl.yaml b/bridgeconfig/gmessages.tpl.yaml index e75eee9..8b7aed3 100644 --- a/bridgeconfig/gmessages.tpl.yaml +++ b/bridgeconfig/gmessages.tpl.yaml @@ -90,7 +90,7 @@ metrics: google_messages: # OS name to tell the phone. This is the name that shows up in the paired devices list. - os: Beeper (self-hosted) + os: {{ or .Params.device_name "Beeper (self-hosted)" }} # Browser type to tell the phone. This decides which icon is shown. # Valid types: OTHER, CHROME, FIREFOX, SAFARI, OPERA, IE, EDGE browser: OTHER diff --git a/bridgeconfig/imessagego.tpl.yaml b/bridgeconfig/imessagego.tpl.yaml index 2945fd4..a4e4e92 100644 --- a/bridgeconfig/imessagego.tpl.yaml +++ b/bridgeconfig/imessagego.tpl.yaml @@ -70,6 +70,9 @@ analytics: # Optional user ID for tracking events. If null, defaults to using Matrix user ID. user_id: null +imessage: + device_name: {{ or .Params.device_name "Beeper (self-hosted)" }} + # Bridge config bridge: # Localpart template of MXIDs for iMessage users. diff --git a/bridgeconfig/telegram.tpl.yaml b/bridgeconfig/telegram.tpl.yaml index bb332b8..cc3bf5d 100644 --- a/bridgeconfig/telegram.tpl.yaml +++ b/bridgeconfig/telegram.tpl.yaml @@ -613,7 +613,7 @@ telegram: # Device info sent to Telegram. device_info: # "auto" = OS name+version. - device_model: Beeper (self-hosted) + device_model: {{ or .Params.device_name "Beeper (self-hosted)" }} # "auto" = Telethon version. system_version: auto # "auto" = mautrix-telegram version. diff --git a/bridgeconfig/whatsapp.tpl.yaml b/bridgeconfig/whatsapp.tpl.yaml index bf402de..0acc822 100644 --- a/bridgeconfig/whatsapp.tpl.yaml +++ b/bridgeconfig/whatsapp.tpl.yaml @@ -91,7 +91,7 @@ metrics: # 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: Beeper (self-hosted) + os_name: {{ or .Params.device_name "Beeper (self-hosted)" }} # 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/efc632c008604016ddde63bfcfca8de4e5304da9/binary/proto/def.proto#L43-L64