Skip to content

Commit

Permalink
Check membership cache in ensureInvited
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 17, 2023
1 parent e10672d commit 0bf0111
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ func (br *SignalBridge) NewUser(dbUser *database.User) *User {
}

func (user *User) ensureInvited(intent *appservice.IntentAPI, roomID id.RoomID, isDirect bool) (ok bool) {
if user.bridge.StateStore.GetMembership(roomID, user.MXID) == event.MembershipJoin {
ok = true
return
}
extraContent := make(map[string]interface{})
if isDirect {
extraContent["is_direct"] = true
Expand Down

0 comments on commit 0bf0111

Please sign in to comment.