mirror of
https://github.com/YunoHost-Apps/mautrix_telegram_ynh.git
synced 2024-09-03 19:45:55 +02:00
Update config from new version and fix encryption enabled value
This commit is contained in:
parent
bec9c3cc71
commit
c9d302fa57
3 changed files with 79 additions and 31 deletions
|
@ -146,6 +146,10 @@ bridge:
|
||||||
# will not send any more members.
|
# will not send any more members.
|
||||||
# -1 means no limit (which means it's limited to 10000 by the server)
|
# -1 means no limit (which means it's limited to 10000 by the server)
|
||||||
max_initial_member_sync: 100
|
max_initial_member_sync: 100
|
||||||
|
# Maximum number of participants in chats to bridge. Only applies when the portal is being created.
|
||||||
|
# If there are more members when trying to create a room, the room creation will be cancelled.
|
||||||
|
# -1 means no limit (which means all chats can be bridged)
|
||||||
|
max_member_count: -1
|
||||||
# Whether or not to sync the member list in channels.
|
# Whether or not to sync the member list in channels.
|
||||||
# If no channel admins have logged into the bridge, the bridge won't be able to sync the member
|
# If no channel admins have logged into the bridge, the bridge won't be able to sync the member
|
||||||
# list regardless of this setting.
|
# list regardless of this setting.
|
||||||
|
@ -172,10 +176,6 @@ bridge:
|
||||||
# Allow logging in within Matrix. If false, users can only log in using login-qr or the
|
# Allow logging in within Matrix. If false, users can only log in using login-qr or the
|
||||||
# out-of-Matrix login website (see appservice.public config section)
|
# out-of-Matrix login website (see appservice.public config section)
|
||||||
allow_matrix_login: true
|
allow_matrix_login: true
|
||||||
# Whether or not to bridge plaintext highlights.
|
|
||||||
# Only enable this if your displayname_template has some static part that the bridge can use to
|
|
||||||
# reliably identify what is a plaintext highlight.
|
|
||||||
plaintext_highlights: false
|
|
||||||
# Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
|
# Whether or not to make portals of publicly joinable channels/supergroups publicly joinable on Matrix.
|
||||||
public_portals: true
|
public_portals: true
|
||||||
# Whether or not to use /sync to get presence, read receipts and typing notifications
|
# Whether or not to use /sync to get presence, read receipts and typing notifications
|
||||||
|
@ -204,13 +204,13 @@ bridge:
|
||||||
# Whether or not the !tg join command should do a HTTP request
|
# Whether or not the !tg join command should do a HTTP request
|
||||||
# to resolve redirects in invite links.
|
# to resolve redirects in invite links.
|
||||||
invite_link_resolve: false
|
invite_link_resolve: false
|
||||||
# Use inline images instead of a separate message for the caption.
|
# Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
|
||||||
# N.B. Inline images are not supported on all clients (e.g. Element iOS/Android).
|
# This is currently not supported in most clients.
|
||||||
inline_images: false
|
caption_in_message: false
|
||||||
# Maximum size of image in megabytes before sending to Telegram as a document.
|
# Maximum size of image in megabytes before sending to Telegram as a document.
|
||||||
image_as_file_size: 10
|
image_as_file_size: 10
|
||||||
# Maximum number of pixels in an image before sending to Telegram as a document. Defaults to 1280x1280 = 1638400.
|
# Maximum number of pixels in an image before sending to Telegram as a document. Defaults to 4096x4096 = 16777216.
|
||||||
image_as_file_pixels: 1638400
|
image_as_file_pixels: 16777216
|
||||||
# Enable experimental parallel file transfer, which makes uploads/downloads much faster by
|
# Enable experimental parallel file transfer, which makes uploads/downloads much faster by
|
||||||
# streaming from/to Matrix and using many connections for Telegram.
|
# streaming from/to Matrix and using many connections for Telegram.
|
||||||
# Note that generating HQ thumbnails for videos is not possible with streamed transfers.
|
# Note that generating HQ thumbnails for videos is not possible with streamed transfers.
|
||||||
|
@ -226,12 +226,24 @@ bridge:
|
||||||
# png - converts to non-animated png (fastest),
|
# png - converts to non-animated png (fastest),
|
||||||
# gif - converts to animated gif
|
# gif - converts to animated gif
|
||||||
# webm - converts to webm video, requires ffmpeg executable with vp9 codec and webm container support
|
# webm - converts to webm video, requires ffmpeg executable with vp9 codec and webm container support
|
||||||
|
# webp - converts to animated webp, requires ffmpeg executable with webp codec/container support
|
||||||
target: gif
|
target: gif
|
||||||
|
# Should video stickers be converted to the specified format as well?
|
||||||
|
convert_from_webm: false
|
||||||
# Arguments for converter. All converters take width and height.
|
# Arguments for converter. All converters take width and height.
|
||||||
args:
|
args:
|
||||||
width: 256
|
width: 256
|
||||||
height: 256
|
height: 256
|
||||||
fps: 25 # only for webm and gif (2, 5, 10, 20 or 25 recommended)
|
fps: 25 # only for webm, webp and gif (2, 5, 10, 20 or 25 recommended)
|
||||||
|
# Settings for converting animated emoji.
|
||||||
|
# Same as animated_sticker, but webm is not supported as the target
|
||||||
|
# (because inline images can only contain images, not videos).
|
||||||
|
animated_emoji:
|
||||||
|
target: webp
|
||||||
|
args:
|
||||||
|
width: 64
|
||||||
|
height: 64
|
||||||
|
fps: 25
|
||||||
# End-to-bridge encryption support options.
|
# End-to-bridge encryption support options.
|
||||||
#
|
#
|
||||||
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
|
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
|
||||||
|
@ -241,20 +253,46 @@ bridge:
|
||||||
# Default to encryption, force-enable encryption in all portals the bridge creates
|
# 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.
|
# This will cause the bridge bot to be in private chats for the encryption to work properly.
|
||||||
default: __IS_ENCRYPTION_ENABLED__
|
default: __IS_ENCRYPTION_ENABLED__
|
||||||
# Database for the encryption data. If set to `default`, will use the appservice database.
|
# Require encryption, drop any unencrypted messages.
|
||||||
database: default
|
require: __IS_ENCRYPTION_ENABLED__
|
||||||
# Options for automatic key sharing.
|
|
||||||
key_sharing:
|
|
||||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
# 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.
|
# You must use a client that supports requesting keys from other users to use this feature.
|
||||||
allow: false
|
allow_key_sharing: false
|
||||||
# Require the requesting device to have a valid cross-signing signature?
|
# What level of device verification should be required from users?
|
||||||
# This doesn't require that the bridge has verified the device, only that the user has verified it.
|
#
|
||||||
# Not yet implemented.
|
# Valid levels:
|
||||||
require_cross_signing: false
|
# unverified - Send keys to all device in the room.
|
||||||
# Require devices to be verified by the bridge?
|
# cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
|
||||||
# Verification by the bridge is not yet implemented.
|
# cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
|
||||||
require_verification: true
|
# cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
|
||||||
|
# Note that creating user signatures from the bridge bot is not currently possible.
|
||||||
|
# verified - Require manual per-device verification
|
||||||
|
# (currently only possible by modifying the `trust` column in the `crypto_device` database table).
|
||||||
|
verification_levels:
|
||||||
|
# Minimum level for which the bridge should send keys to when bridging messages from Telegram to Matrix.
|
||||||
|
receive: unverified
|
||||||
|
# Minimum level that the bridge should accept for incoming Matrix messages.
|
||||||
|
send: unverified
|
||||||
|
# Minimum level that the bridge should require for accepting key requests.
|
||||||
|
share: cross-signed-tofu
|
||||||
|
# Options for Megolm room key rotation. These options allow you to
|
||||||
|
# configure the m.room.encryption event content. See:
|
||||||
|
# https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
|
||||||
|
# more information about that event.
|
||||||
|
rotation:
|
||||||
|
# Enable custom Megolm room key rotation settings. Note that these
|
||||||
|
# settings will only apply to rooms created after this option is
|
||||||
|
# set.
|
||||||
|
enable_custom: false
|
||||||
|
# The maximum number of milliseconds a session should be used
|
||||||
|
# before changing it. The Matrix spec recommends 604800000 (a week)
|
||||||
|
# as the default.
|
||||||
|
milliseconds: 604800000
|
||||||
|
# The maximum number of messages that should be sent with a given a
|
||||||
|
# session before changing it. The Matrix spec recommends 100 as the
|
||||||
|
# default.
|
||||||
|
messages: 100
|
||||||
|
|
||||||
# Whether or not to explicitly set the avatar and room name for private
|
# Whether or not to explicitly set the avatar and room name for private
|
||||||
# chat portal rooms. This will be implicitly enabled if encryption.default is true.
|
# chat portal rooms. This will be implicitly enabled if encryption.default is true.
|
||||||
private_chat_portal_meta: false
|
private_chat_portal_meta: false
|
||||||
|
@ -263,6 +301,8 @@ bridge:
|
||||||
delivery_receipts: false
|
delivery_receipts: false
|
||||||
# Whether or not delivery errors should be reported as messages in the Matrix room.
|
# Whether or not delivery errors should be reported as messages in the Matrix room.
|
||||||
delivery_error_reports: false
|
delivery_error_reports: false
|
||||||
|
# Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
|
||||||
|
message_status_events: false
|
||||||
# Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
|
# Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
|
||||||
# This field will automatically be changed back to false after it,
|
# This field will automatically be changed back to false after it,
|
||||||
# except if the config file is not writable.
|
# except if the config file is not writable.
|
||||||
|
@ -282,6 +322,9 @@ bridge:
|
||||||
kick_on_logout: true
|
kick_on_logout: true
|
||||||
# Should the "* user joined Telegram" notice always be marked as read automatically?
|
# Should the "* user joined Telegram" notice always be marked as read automatically?
|
||||||
always_read_joined_telegram_notice: true
|
always_read_joined_telegram_notice: true
|
||||||
|
# Should the bridge auto-create a group chat on Telegram when a ghost is invited to a room?
|
||||||
|
# Requires the user to have sufficient power level and double puppeting enabled.
|
||||||
|
create_group_on_invite: true
|
||||||
# Settings for backfilling messages from Telegram.
|
# Settings for backfilling messages from Telegram.
|
||||||
backfill:
|
backfill:
|
||||||
# Whether or not the Telegram ghosts of logged in Matrix users should be
|
# Whether or not the Telegram ghosts of logged in Matrix users should be
|
||||||
|
@ -325,8 +368,7 @@ bridge:
|
||||||
# List of user IDs for whom the previous flag is flipped.
|
# List of user IDs for whom the previous flag is flipped.
|
||||||
# e.g. if bridge_notices.default is false, notices from other users will not be bridged, but
|
# e.g. if bridge_notices.default is false, notices from other users will not be bridged, but
|
||||||
# notices from users listed here will be bridged.
|
# notices from users listed here will be bridged.
|
||||||
exceptions:
|
exceptions: []
|
||||||
- "@importantbot:example.com"
|
|
||||||
|
|
||||||
# An array of possible values for the $distinguisher variable in message formats.
|
# An array of possible values for the $distinguisher variable in message formats.
|
||||||
# Each user gets one of the values here, based on a hash of their user ID.
|
# Each user gets one of the values here, based on a hash of their user ID.
|
||||||
|
@ -451,6 +493,12 @@ telegram:
|
||||||
# (Optional) Create your own bot at https://t.me/BotFather
|
# (Optional) Create your own bot at https://t.me/BotFather
|
||||||
bot_token: __BOTTOKEN__
|
bot_token: __BOTTOKEN__
|
||||||
|
|
||||||
|
# Should the bridge request missed updates from Telegram when restarting?
|
||||||
|
catch_up: true
|
||||||
|
# Should incoming updates be handled sequentially to make sure order is preserved on Matrix?
|
||||||
|
sequential_updates: true
|
||||||
|
exit_on_update_error: false
|
||||||
|
|
||||||
# Telethon connection options.
|
# Telethon connection options.
|
||||||
connection:
|
connection:
|
||||||
# The timeout in seconds to be used when connecting.
|
# The timeout in seconds to be used when connecting.
|
||||||
|
@ -476,7 +524,7 @@ telegram:
|
||||||
# Device info sent to Telegram.
|
# Device info sent to Telegram.
|
||||||
device_info:
|
device_info:
|
||||||
# "auto" = OS name+version.
|
# "auto" = OS name+version.
|
||||||
device_model: auto
|
device_model: mautrix-telegram
|
||||||
# "auto" = Telethon version.
|
# "auto" = Telethon version.
|
||||||
system_version: auto
|
system_version: auto
|
||||||
# "auto" = mautrix-telegram version.
|
# "auto" = mautrix-telegram version.
|
||||||
|
|
|
@ -164,10 +164,10 @@ ynh_script_progression --message="Configuring Mautrix-Bridge..." --weight=2
|
||||||
mautrix_config_path="$final_path/config.yaml"
|
mautrix_config_path="$final_path/config.yaml"
|
||||||
as_token="\"This value is generated when generating the registration\""
|
as_token="\"This value is generated when generating the registration\""
|
||||||
hs_token="\"This value is generated when generating the registration\""
|
hs_token="\"This value is generated when generating the registration\""
|
||||||
is_encryption_enabled=$encryption
|
is_encryption_enabled="$encryption"
|
||||||
|
|
||||||
if [ $encryption -eq 1 ]; then
|
if [ $encryption -eq 1 ]; then
|
||||||
is_encryption_enabled=true
|
is_encryption_enabled="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write_bridge_config
|
write_bridge_config
|
||||||
|
|
|
@ -135,10 +135,10 @@ as_token=$(grep "as_token:" "$mautrix_config_path" | sed -r "s/ *as_token: *//")
|
||||||
hs_token=$(grep "hs_token:" "$mautrix_config_path" | sed -r "s/ *hs_token: *//")
|
hs_token=$(grep "hs_token:" "$mautrix_config_path" | sed -r "s/ *hs_token: *//")
|
||||||
# ynh_replace_string --match_string=__AS_TOKEN__ --replace_string="$as_token" --target_file="$mautrix_config_path"
|
# ynh_replace_string --match_string=__AS_TOKEN__ --replace_string="$as_token" --target_file="$mautrix_config_path"
|
||||||
# ynh_replace_string --match_string=__HS_TOKEN__ --replace_string="$hs_token" --target_file="$mautrix_config_path"
|
# ynh_replace_string --match_string=__HS_TOKEN__ --replace_string="$hs_token" --target_file="$mautrix_config_path"
|
||||||
is_encryption_enabled=$encryption
|
is_encryption_enabled="$encryption"
|
||||||
|
|
||||||
if [ $encryption -eq 1 ]; then
|
if [ $encryption -eq 1 ]; then
|
||||||
is_encryption_enabled=true
|
is_encryption_enabled="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write_bridge_config
|
write_bridge_config
|
||||||
|
|
Loading…
Reference in a new issue