Skip to content

Commit

Permalink
Reply with error when trying to send without being logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 26, 2023
1 parent 9201bff commit ed4c7c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (portal *Portal) handleMatrixMessages(msg portalMatrixMessage) {
// If we have no SignalDevice, the bridge isn't logged in properly,
// so send BAD_CREDENTIALS so the user knows
if !msg.user.SignalDevice.IsDeviceLoggedIn() {
portal.sendMessageStatusCheckpointFailed(msg.evt, errUserNotLoggedIn)
go portal.sendMessageMetrics(msg.evt, errUserNotLoggedIn, "Ignoring", nil)
msg.user.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: "You have been logged out of Signal, please reconnect"})
return
}
Expand Down

0 comments on commit ed4c7c9

Please sign in to comment.