Skip to content

Commit

Permalink
fix chat room crash in aim 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mk6i committed Sep 4, 2024
1 parent 5cc3a60 commit ed705e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/oscar/handler/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ func NewChatRouter(h Handlers) oscar.Router {
router.Register(wire.OService, wire.OServiceClientOnline, h.ClientOnline)
router.Register(wire.OService, wire.OServiceClientVersions, h.OServiceHandler.ClientVersions)
router.Register(wire.OService, wire.OServiceIdleNotification, h.OServiceHandler.IdleNotification)
router.Register(wire.OService, wire.OServiceNoop, h.OServiceHandler.Noop)
router.Register(wire.OService, wire.OServiceRateParamsQuery, h.OServiceHandler.RateParamsQuery)
router.Register(wire.OService, wire.OServiceRateParamsSubAdd, h.OServiceHandler.RateParamsSubAdd)
router.Register(wire.OService, wire.OServiceSetPrivacyFlags, h.OServiceHandler.SetPrivacyFlags)
router.Register(wire.OService, wire.OServiceSetUserInfoFields, h.OServiceHandler.SetUserInfoFields)
router.Register(wire.OService, wire.OServiceUserInfoQuery, h.OServiceHandler.UserInfoQuery)
router.Register(wire.OService, wire.OServiceSetPrivacyFlags, h.OServiceHandler.SetPrivacyFlags)

return router
}
Expand Down
2 changes: 1 addition & 1 deletion state/user_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ func (f SQLiteUserStore) ChatRoomByCookie(cookie string) (ChatRoom, error) {
&creator,
)
if errors.Is(err, sql.ErrNoRows) {
err = ErrChatRoomNotFound
err = fmt.Errorf("%w: %s", ErrChatRoomNotFound, cookie)
}
chatRoom.creator = NewIdentScreenName(creator)

Expand Down

0 comments on commit ed705e7

Please sign in to comment.