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:
+1
-10
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user