Skip to content

Commit 87d599c

Browse files
committed
crypto: remove group session already shared error
1 parent 135cffc commit 87d599c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crypto/encryptmegolm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
)
2626

2727
var (
28-
AlreadyShared = errors.New("group session already shared")
2928
NoGroupSession = errors.New("no group session created")
3029
)
3130

@@ -209,7 +208,8 @@ func (mach *OlmMachine) ShareGroupSession(ctx context.Context, roomID id.RoomID,
209208
if err != nil {
210209
return fmt.Errorf("failed to get previous outbound group session: %w", err)
211210
} else if session != nil && session.Shared && !session.Expired() {
212-
return AlreadyShared
211+
mach.machOrContextLog(ctx).Debug().Stringer("room_id", roomID).Msg("Not re-sharing group session, already shared")
212+
return nil
213213
}
214214
log := mach.machOrContextLog(ctx).With().
215215
Str("room_id", roomID.String()).

0 commit comments

Comments
 (0)