Skip to content

Commit

Permalink
Code review suggestions: tulir(batch 1)
Browse files Browse the repository at this point in the history
Co-authored-by: Tulir Asokan <[email protected]>
  • Loading branch information
purpshell and tulir authored Oct 16, 2024
1 parent e77635c commit 73e2d68
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions pkg/connector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ type Config struct {
DisplaynameTemplate string `yaml:"displayname_template"`
DisplayNameMaxLength int `yaml:"displayname_max_length"`

DeliveryReceipts bool `yaml:"delivery_receipts"`

displaynameTemplate *template.Template `yaml:"-"`
}

Expand All @@ -46,8 +44,6 @@ func upgradeConfig(helper up.Helper) {
helper.Copy(up.Str, "username_template")
helper.Copy(up.Str, "displayname_template")
helper.Copy(up.Int, "displayname_max_length")

helper.Copy(up.Bool, "delivery_receipts")
}

type DisplaynameParams struct {
Expand Down
6 changes: 1 addition & 5 deletions pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@ import (
type TwitterConnector struct {
br *bridgev2.Bridge

Config *Config
Config Config
}

var _ bridgev2.NetworkConnector = (*TwitterConnector)(nil)

func NewConnector() *TwitterConnector {
return &TwitterConnector{}
}

func (tc *TwitterConnector) Init(bridge *bridgev2.Bridge) {
tc.br = bridge
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/connector/example-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ get_proxy_url: null
displayname_template: "{{ .DisplayName }} (Twitter)"
# Maximum length of displayname
displayname_max_length: 100

# Whether the bridge should send a read receipt from the bridge bot when a message has
# been sent to Twitter.
delivery_receipts: false

0 comments on commit 73e2d68

Please sign in to comment.