Skip to content

Commit

Permalink
update mautrix-go
Browse files Browse the repository at this point in the history
  • Loading branch information
maltee1 committed Aug 9, 2024
1 parent 2f52b8f commit 0f3afe0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
7 changes: 0 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,3 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
maunium.net/go/mauflag v1.0.0 // indirect
)
<<<<<<< HEAD
=======

//replace maunium.net/go/mautrix => ../mautrix-go
//replace go.mau.fi/util => ../../Go/go-util
replace maunium.net/go/mautrix => github.com/maltee1/mautrix-go v0.0.0-20240808204140-9598e29d1124
>>>>>>> aec8c02 (fixes)
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
<<<<<<< HEAD
=======
github.com/maltee1/mautrix-go v0.0.0-20240808204140-9598e29d1124 h1:zgSOHfcfq6NXuHL+mo/IexMGksBmrZcVyPjipTjEILc=
github.com/maltee1/mautrix-go v0.0.0-20240808204140-9598e29d1124/go.mod h1:ZWyxoQxRTBxzWIMs0kQCVogZIY0clTu33h102veCT/Q=
>>>>>>> aec8c02 (fixes)
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
Expand Down
11 changes: 10 additions & 1 deletion pkg/connector/handlematrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,15 @@ func (s *SignalClient) HandleMatrixMembership(ctx context.Context, msg *bridgev2
var targetIntent bridgev2.MatrixAPI
var targetSignalID uuid.UUID
var err error
if msg.Portal.RoomType == database.RoomTypeDM {
//TODO: this probably needs to revert some changes and clean up the portal on leaves
switch msg.Type {
case bridgev2.Invite:
return false, fmt.Errorf("cannot invite additional user to dm")
default:
return false, nil
}
}
if msg.TargetGhost != nil {
targetIntent = msg.TargetGhost.Intent
targetSignalID, err = signalid.ParseUserID(msg.TargetGhost.ID)
Expand Down Expand Up @@ -421,7 +430,7 @@ func (s *SignalClient) HandleMatrixMembership(ctx context.Context, msg *bridgev2
}}
case bridgev2.RetractKnock, bridgev2.RejectKnock:
gc.DeleteRequestingMembers = []*uuid.UUID{&targetSignalID}
case bridgev2.BanKnocked, bridgev2.BanInvited, bridgev2.BanJoined, bridgev2.Ban:
case bridgev2.BanKnocked, bridgev2.BanInvited, bridgev2.BanJoined, bridgev2.BanLeft:
gc.AddBannedMembers = []*signalmeow.BannedMember{{
ServiceID: libsignalgo.NewACIServiceID(targetSignalID),
Timestamp: uint64(time.Now().UnixMilli()),
Expand Down

0 comments on commit 0f3afe0

Please sign in to comment.