Merge pull request #26 from YunoHost-Apps/ci-auto-update-v0.12.0

Upgrade to version 0.12.0
This commit is contained in:
Dante 2022-08-27 23:09:29 +01:00 committed by GitHub
commit 1fd12b72de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 87 additions and 51 deletions

View file

@ -50,7 +50,7 @@ See also [upstream wiki Authentication page](https://docs.mau.fi/bridges/python/
* see https://docs.mau.fi/bridges/python/telegram/relay-bot.html * see https://docs.mau.fi/bridges/python/telegram/relay-bot.html
**Shipped version:** 0.11.3~ynh2 **Shipped version:** 0.12.0~ynh1
## Disclaimers / important information ## Disclaimers / important information

View file

@ -50,7 +50,7 @@ See also [upstream wiki Authentication page](https://docs.mau.fi/bridges/python/
* see https://docs.mau.fi/bridges/python/telegram/relay-bot.html * see https://docs.mau.fi/bridges/python/telegram/relay-bot.html
**Version incluse :** 0.11.3~ynh2 **Version incluse :** 0.12.0~ynh1
## Avertissements / informations importantes ## Avertissements / informations importantes

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.11.3.tar.gz SOURCE_URL=https://github.com/mautrix/telegram/archive/refs/tags/v0.12.0.tar.gz
SOURCE_SUM=5ce51e8265316e1ac706c7f70c446d28b9728cb26e63b6afc48412d12ccd9a97 SOURCE_SUM=bcc971d638a985d5196c1986f8f332b0f8236b6f34da712bec8662ab38523434
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -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.

View file

@ -6,7 +6,7 @@
"en": "Telegram puppeting bridge for Matrix/Synapse", "en": "Telegram puppeting bridge for Matrix/Synapse",
"fr": "Passerelle Telegram pour Matrix/Synapse" "fr": "Passerelle Telegram pour Matrix/Synapse"
}, },
"version": "0.11.3~ynh2", "version": "0.12.0~ynh1",
"url": "https://docs.mau.fi/bridges/python/telegram/index.html", "url": "https://docs.mau.fi/bridges/python/telegram/index.html",
"upstream": { "upstream": {
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
@ -24,8 +24,7 @@
"yunohost": ">= 11.0.0" "yunohost": ">= 11.0.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [],
],
"arguments": { "arguments": {
"install": [ "install": [
{ {

View file

@ -5,9 +5,8 @@
#================================================= #=================================================
# dependencies used by the app # dependencies used by the app
# HACK zlib1g-dev libjpeg-dev (libwebp-dev optional but necessary for stickers) are necessary to compile / install pillow # HACK zlib1g-dev libjpeg-dev (libwebp-dev and libolm-dev optional but necessary for stickers/e2be) are necessary to compile / install pillow
pkg_dependencies="postgresql python3 zlib1g-dev libjpeg-dev libwebp-dev python3-venv libpq-dev libffi-dev" pkg_dependencies="postgresql python3 zlib1g-dev libjpeg-dev libwebp-dev python3-venv libpq-dev libffi-dev libolm-dev"
pkg_dependencies_e2be="libolm-dev"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -107,11 +107,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=97 ynh_script_progression --message="Installing dependencies..." --weight=97
if [ $encryption -eq 1 ]; then
# Install libolm-dev to be able to use encryption
ynh_install_extra_app_dependencies $pkg_dependencies_e2be
fi
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
@ -164,10 +159,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

View file

@ -97,11 +97,6 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=1 ynh_script_progression --message="Upgrading dependencies..." --weight=1
if [ $encryption -eq 1 ]; then
# Install libolm-dev to be able to use encryption
ynh_install_extra_app_dependencies $pkg_dependencies_e2be
fi
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
@ -135,10 +130,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