Skip to content

Commit

Permalink
ids: add support for split portals
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 14, 2024
1 parent 89373f3 commit 4b7b3c5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
golang.org/x/net v0.29.0
google.golang.org/protobuf v1.34.2
maunium.net/go/mautrix v0.20.1-0.20240913095532-e12ecbe82d36
maunium.net/go/mautrix v0.20.1-0.20240914094516-d89dac594db0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M=
maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
maunium.net/go/mautrix v0.20.1-0.20240913095532-e12ecbe82d36 h1:XKDqeDfRHmgke2N16A41eOckQQqezosxaEyehG/rupM=
maunium.net/go/mautrix v0.20.1-0.20240913095532-e12ecbe82d36/go.mod h1:amzKPIZVO7v1piD2JhKG1RvGZoV+5wEZfoHaEXOjjqA=
maunium.net/go/mautrix v0.20.1-0.20240914094516-d89dac594db0 h1:fTX1P8TPv+oUqHGu08jj6FYH+Q/fC9jtmvkXcAw+KTo=
maunium.net/go/mautrix v0.20.1-0.20240914094516-d89dac594db0/go.mod h1:amzKPIZVO7v1piD2JhKG1RvGZoV+5wEZfoHaEXOjjqA=
2 changes: 1 addition & 1 deletion pkg/connector/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
func (s *SignalClient) makePortalKey(chatID string) networkid.PortalKey {
key := networkid.PortalKey{ID: networkid.PortalID(chatID)}
// For non-group chats, add receiver
if len(chatID) != 44 {
if s.Main.Bridge.Config.SplitPortals || len(chatID) != 44 {
key.Receiver = s.UserLogin.ID
}
return key
Expand Down
7 changes: 0 additions & 7 deletions pkg/signalid/ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ func MakeGroupPortalID(groupID types.GroupIdentifier) networkid.PortalID {
return networkid.PortalID(groupID)
}

func MakeGroupPortalKey(groupID types.GroupIdentifier) networkid.PortalKey {
return networkid.PortalKey{
ID: MakeGroupPortalID(groupID),
Receiver: "",
}
}

func MakeDMPortalID(serviceID libsignalgo.ServiceID) networkid.PortalID {
return networkid.PortalID(serviceID.String())
}
Expand Down

0 comments on commit 4b7b3c5

Please sign in to comment.