config: remove set_private_chat_portal_meta option

It's handled by bridgev2

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-07-17 12:34:28 -06:00
parent 48858ac28f
commit 9d77bebe3e
3 changed files with 1 additions and 17 deletions
+1 -10
View File
@@ -231,14 +231,6 @@ func (t *TelegramClient) GetChatInfo(ctx context.Context, portal *bridgev2.Porta
return nil, err
}
if t.main.Config.SetPrivateChatPortalMeta {
chatInfo.Name = userInfo.Name
chatInfo.Avatar = userInfo.Avatar
} else {
chatInfo.Name = ptr.Ptr("")
chatInfo.Avatar = &bridgev2.Avatar{Remove: true}
}
chatInfo.Members.Members = []bridgev2.ChatMember{
{
EventSender: bridgev2.EventSender{
@@ -411,8 +403,7 @@ func (t *TelegramClient) GetChatInfo(ctx context.Context, portal *bridgev2.Porta
}
}
default:
// fmt.Printf("%s %d\n", peerType, id)
panic("unimplemented getchatinfo")
panic(fmt.Sprintf("unsupported peer type %s", peerType))
}
return &chatInfo, nil
-3
View File
@@ -18,8 +18,6 @@ type TelegramConfig struct {
AppID int `yaml:"app_id"`
AppHash string `yaml:"app_hash"`
SetPrivateChatPortalMeta bool `yaml:"set_private_chat_portal_meta"`
AnimatedSticker media.AnimatedStickerConfig `yaml:"animated_sticker"`
MemberList struct {
@@ -37,7 +35,6 @@ var ExampleConfig string
func upgradeConfig(helper up.Helper) {
helper.Copy(up.Int, "app_id")
helper.Copy(up.Str, "app_hash")
helper.Copy(up.Bool, "set_private_chat_portal_meta")
helper.Copy(up.Str, "animated_sticker", "target")
helper.Copy(up.Bool, "animated_sticker", "convert_from_webm")
helper.Copy(up.Int, "animated_sticker", "args", "width")
-4
View File
@@ -2,10 +2,6 @@
app_id: 12345
app_hash: tjyd5yge35lbodk1xwzw2jstp90k55qz
# Whether to explicitly set the avatar and room name for private chat portal
# rooms.
set_private_chat_portal_meta: true
# Settings for converting animated stickers.
animated_sticker:
# Format to which animated stickers should be converted.