Skip to content

Commit

Permalink
config: remove pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 10, 2024
1 parent fed58c6 commit c3ac2bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/mautrix-signal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var m = mxmain.BridgeMain{
Description: "A Matrix-Signal puppeting bridge.",
Version: "0.7.0",

Connector: connector.NewConnector(),
Connector: &connector.SignalConnector{},
}

func main() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ func upgradeConfig(helper up.Helper) {
}

func (s *SignalConnector) GetConfig() (string, any, up.Upgrader) {
return ExampleConfig, s.Config, up.SimpleUpgrader(upgradeConfig)
return ExampleConfig, &s.Config, up.SimpleUpgrader(upgradeConfig)
}
8 changes: 1 addition & 7 deletions pkg/connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,12 @@ type SignalConnector struct {
MsgConv *msgconv.MessageConverter
Store *store.Container
Bridge *bridgev2.Bridge
Config *SignalConfig
Config SignalConfig
}

var _ bridgev2.NetworkConnector = (*SignalConnector)(nil)
var _ bridgev2.MaxFileSizeingNetwork = (*SignalConnector)(nil)

func NewConnector() *SignalConnector {
return &SignalConnector{
Config: &SignalConfig{},
}
}

var signalGeneralCaps = &bridgev2.NetworkGeneralCapabilities{
DisappearingMessages: true,
AggressiveUpdateInfo: true,
Expand Down

0 comments on commit c3ac2bc

Please sign in to comment.