diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..1963bbd2 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,31 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 diff --git a/.mockery.yaml b/.mockery.yaml index 9a21a981..22433160 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -3,7 +3,7 @@ dir: "{{.InterfaceDir}}" mockname: "mock{{.InterfaceName}}" inpackage: True packages: - github.com/mkaminski/goaim/server: + github.com/mw0x7/retro-aim-server/server: interfaces: AuthHandler: config: @@ -44,7 +44,7 @@ packages: ChatServiceRouter: config: filename: "chat_service_router_mock_test.go" - github.com/mkaminski/goaim/handler: + github.com/mw0x7/retro-aim-server/handler: interfaces: FeedbagManager: config: diff --git a/LICENSE b/LICENSE index 9aec4f70..5bf98312 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Mike Kaminski +Copyright (c) 2024 mw0x7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d2e1ed29..edd3b040 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Retro AIM Server +[![codecov](https://codecov.io/github/mw0x7/retro-aim-server/graph/badge.svg?token=MATKPP77JT)](https://codecov.io/github/mw0x7/retro-aim-server) Retro AIM Server is a server implementation of the OSCAR protocol that supports AIM versions 5.0-5.9. diff --git a/cmd/main.go b/cmd/main.go index 9fbd7f77..e8b93423 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -6,11 +6,11 @@ import ( "os" "sync" - "github.com/mkaminski/goaim/handler" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/handler" + "github.com/mw0x7/retro-aim-server/state" "github.com/kelseyhightower/envconfig" - "github.com/mkaminski/goaim/server" + "github.com/mw0x7/retro-aim-server/server" ) func main() { diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..d2440ff4 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,3 @@ +coverage: + round: down + range: 70..79 \ No newline at end of file diff --git a/go.mod b/go.mod index e3410d7c..0f077e22 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ -module github.com/mkaminski/goaim +module github.com/mw0x7/retro-aim-server -go 1.20 +go 1.21.3 require ( - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.5.0 github.com/kelseyhightower/envconfig v1.4.0 - github.com/mattn/go-sqlite3 v1.14.17 + github.com/mattn/go-sqlite3 v1.14.19 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index 2ad9d5a3..59387627 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= -github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI= +github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/handler/auth.go b/handler/auth.go index 34f972b0..1b16cdbb 100644 --- a/handler/auth.go +++ b/handler/auth.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/google/uuid" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/server" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/server" + "github.com/mw0x7/retro-aim-server/state" ) // NewAuthService creates a new instance of AuthService. diff --git a/handler/auth_test.go b/handler/auth_test.go index a5398289..e17c94f8 100644 --- a/handler/auth_test.go +++ b/handler/auth_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/google/uuid" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/server" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/server" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/handler/buddy.go b/handler/buddy.go index 18cb56ad..2e1801ff 100644 --- a/handler/buddy.go +++ b/handler/buddy.go @@ -3,8 +3,8 @@ package handler import ( "context" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) func NewBuddyService() *BuddyService { diff --git a/handler/buddy_test.go b/handler/buddy_test.go index f9c51cfa..cb347dc4 100644 --- a/handler/buddy_test.go +++ b/handler/buddy_test.go @@ -3,7 +3,7 @@ package handler import ( "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" ) diff --git a/handler/chat.go b/handler/chat.go index 8e18fff4..f50268db 100644 --- a/handler/chat.go +++ b/handler/chat.go @@ -3,18 +3,18 @@ package handler import ( "context" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) -func NewChatService(chatRegistry *state.ChatRegistry) *ChatService { +func NewChatService(chatRegistry ChatRegistry) *ChatService { return &ChatService{ chatRegistry: chatRegistry, } } type ChatService struct { - chatRegistry *state.ChatRegistry + chatRegistry ChatRegistry } func (s ChatService) ChannelMsgToHostHandler(ctx context.Context, sess *state.Session, chatID string, inFrame oscar.SNACFrame, inBody oscar.SNAC_0x0E_0x05_ChatChannelMsgToHost) (*oscar.SNACMessage, error) { diff --git a/handler/chat_message_relayer_mock_test.go b/handler/chat_message_relayer_mock_test.go index 6e8606ef..ab34dc92 100644 --- a/handler/chat_message_relayer_mock_test.go +++ b/handler/chat_message_relayer_mock_test.go @@ -5,10 +5,10 @@ package handler import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockChatMessageRelayer is an autogenerated mock type for the ChatMessageRelayer type diff --git a/handler/chat_nav.go b/handler/chat_nav.go index 1a75e1e8..cf117166 100644 --- a/handler/chat_nav.go +++ b/handler/chat_nav.go @@ -6,8 +6,8 @@ import ( "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // NewChatNavService creates a new instance of NewChatNavService. diff --git a/handler/chat_nav_test.go b/handler/chat_nav_test.go index 0e39140f..ad7beedc 100644 --- a/handler/chat_nav_test.go +++ b/handler/chat_nav_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" ) diff --git a/handler/chat_registry_test.go b/handler/chat_registry_test.go index 8221b026..727b7793 100644 --- a/handler/chat_registry_test.go +++ b/handler/chat_registry_test.go @@ -3,7 +3,7 @@ package handler import ( - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" mock "github.com/stretchr/testify/mock" ) diff --git a/handler/chat_test.go b/handler/chat_test.go index be43146a..55fdef69 100644 --- a/handler/chat_test.go +++ b/handler/chat_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -18,10 +18,14 @@ func TestChatService_ChannelMsgToHostHandler(t *testing.T) { userSession *state.Session // inputSNAC is the SNAC sent by the sender client inputSNAC oscar.SNACMessage + // mockParams is the list of params sent to mocks that satisfy this + // method's dependencies + mockParams mockParams // expectSNACToParticipants is the message the server broadcast to chat // room participants (except the sender) expectSNACToParticipants oscar.SNACMessage expectOutput *oscar.SNACMessage + wantErr error }{ { name: "send chat room message, expect acknowledgement to sender client", @@ -47,6 +51,13 @@ func TestChatService_ChannelMsgToHostHandler(t *testing.T) { }, }, }, + mockParams: mockParams{ + chatRegistryParams: chatRegistryParams{ + chatRegistryRetrieveParams: chatRegistryRetrieveParams{ + chatID: "the-chat-id", + }, + }, + }, expectSNACToParticipants: oscar.SNACMessage{ Frame: oscar.SNACFrame{ FoodGroup: oscar.Chat, @@ -104,6 +115,13 @@ func TestChatService_ChannelMsgToHostHandler(t *testing.T) { }, }, }, + mockParams: mockParams{ + chatRegistryParams: chatRegistryParams{ + chatRegistryRetrieveParams: chatRegistryRetrieveParams{ + chatID: "the-chat-id", + }, + }, + }, expectSNACToParticipants: oscar.SNACMessage{ Frame: oscar.SNACFrame{ FoodGroup: oscar.Chat, @@ -121,7 +139,36 @@ func TestChatService_ChannelMsgToHostHandler(t *testing.T) { }, }, }, - expectOutput: &oscar.SNACMessage{}, + }, + { + name: "send chat room message, fail due to missing chat room", + userSession: newTestSession("user_sending_chat_msg", sessOptCannedSignonTime), + inputSNAC: oscar.SNACMessage{ + Frame: oscar.SNACFrame{ + RequestID: 1234, + }, + Body: oscar.SNAC_0x0E_0x05_ChatChannelMsgToHost{ + Cookie: 1234, + Channel: 14, + TLVRestBlock: oscar.TLVRestBlock{ + TLVList: oscar.TLVList{ + { + Tag: oscar.ChatTLVPublicWhisperFlag, + Value: []byte{}, + }, + }, + }, + }, + }, + mockParams: mockParams{ + chatRegistryParams: chatRegistryParams{ + chatRegistryRetrieveParams: chatRegistryRetrieveParams{ + chatID: "the-chat-id", + err: state.ErrChatRoomNotFound, + }, + }, + }, + wantErr: state.ErrChatRoomNotFound, }, } @@ -130,20 +177,20 @@ func TestChatService_ChannelMsgToHostHandler(t *testing.T) { chatID := "the-chat-id" chatSessMgr := newMockChatMessageRelayer(t) - chatSessMgr.EXPECT(). - RelayToAllExcept(mock.Anything, tc.userSession, tc.expectSNACToParticipants) + if tc.mockParams.chatRegistryRetrieveParams.err == nil { + chatSessMgr.EXPECT(). + RelayToAllExcept(mock.Anything, tc.userSession, tc.expectSNACToParticipants) + } - svc := NewChatService(state.NewChatRegistry()) - svc.chatRegistry.Register(state.ChatRoom{Cookie: chatID}, chatSessMgr) + chatRegistry := newMockChatRegistry(t) + chatRegistry.EXPECT(). + Retrieve(tc.mockParams.chatRegistryRetrieveParams.chatID). + Return(state.ChatRoom{}, chatSessMgr, tc.mockParams.chatRegistryRetrieveParams.err) + svc := NewChatService(chatRegistry) outputSNAC, err := svc.ChannelMsgToHostHandler(context.Background(), tc.userSession, chatID, tc.inputSNAC.Frame, tc.inputSNAC.Body.(oscar.SNAC_0x0E_0x05_ChatChannelMsgToHost)) - assert.NoError(t, err) - - if tc.expectOutput.Frame == (oscar.SNACFrame{}) { - return // handler doesn't return response - } - + assert.ErrorIs(t, err, tc.wantErr) assert.Equal(t, tc.expectOutput, outputSNAC) }) } diff --git a/handler/feedbag.go b/handler/feedbag.go index ed100964..e9c34694 100644 --- a/handler/feedbag.go +++ b/handler/feedbag.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // NewFeedbagService creates a new instance of FeedbagService. diff --git a/handler/feedbag_manager_mock_test.go b/handler/feedbag_manager_mock_test.go index 28fa4168..7c913a27 100644 --- a/handler/feedbag_manager_mock_test.go +++ b/handler/feedbag_manager_mock_test.go @@ -3,10 +3,10 @@ package handler import ( - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" time "time" ) diff --git a/handler/feedbag_test.go b/handler/feedbag_test.go index 2271bba3..ff3418d8 100644 --- a/handler/feedbag_test.go +++ b/handler/feedbag_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/handler/icbm.go b/handler/icbm.go index 7762bab9..1077dd8a 100644 --- a/handler/icbm.go +++ b/handler/icbm.go @@ -3,8 +3,8 @@ package handler import ( "context" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) const ( diff --git a/handler/icbm_test.go b/handler/icbm_test.go index ccd97506..4e196a48 100644 --- a/handler/icbm_test.go +++ b/handler/icbm_test.go @@ -3,8 +3,8 @@ package handler import ( "testing" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/handler/locate.go b/handler/locate.go index c39355f8..a8bbd772 100644 --- a/handler/locate.go +++ b/handler/locate.go @@ -3,8 +3,8 @@ package handler import ( "context" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // NewLocateService creates a new instance of LocateService. diff --git a/handler/locate_test.go b/handler/locate_test.go index d7ce866f..3ec61d2a 100644 --- a/handler/locate_test.go +++ b/handler/locate_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/mock" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" ) diff --git a/handler/message_relayer_mock_test.go b/handler/message_relayer_mock_test.go index d9ac4afc..30791748 100644 --- a/handler/message_relayer_mock_test.go +++ b/handler/message_relayer_mock_test.go @@ -5,10 +5,10 @@ package handler import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockMessageRelayer is an autogenerated mock type for the MessageRelayer type diff --git a/handler/oservice.go b/handler/oservice.go index 99037532..1a2a3d5b 100644 --- a/handler/oservice.go +++ b/handler/oservice.go @@ -7,9 +7,9 @@ import ( "fmt" "time" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/server" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/server" + "github.com/mw0x7/retro-aim-server/state" ) // NewOServiceService creates a new instance of OServiceService. diff --git a/handler/oservice_test.go b/handler/oservice_test.go index ef6f9945..85789a79 100644 --- a/handler/oservice_test.go +++ b/handler/oservice_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/mock" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/server" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/server" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" ) diff --git a/handler/session_manager_mock_test.go b/handler/session_manager_mock_test.go index 47af038b..c8895c4f 100644 --- a/handler/session_manager_mock_test.go +++ b/handler/session_manager_mock_test.go @@ -3,7 +3,7 @@ package handler import ( - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" mock "github.com/stretchr/testify/mock" ) diff --git a/handler/test_helpers.go b/handler/test_helpers.go index 7565b484..08a7b23b 100644 --- a/handler/test_helpers.go +++ b/handler/test_helpers.go @@ -3,8 +3,8 @@ package handler import ( "time" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // mockParams is a helper struct that centralizes mock function call parameters @@ -27,6 +27,7 @@ type chatRegistryRetrieveParams struct { chatID string retChatRoom state.ChatRoom retChatSessMgr any + err error } // userManagerParams is a helper struct that contains mock parameters for diff --git a/handler/types.go b/handler/types.go index 7722373a..ae2b73df 100644 --- a/handler/types.go +++ b/handler/types.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type FeedbagManager interface { diff --git a/handler/user_manager_manager_mock_test.go b/handler/user_manager_manager_mock_test.go index 172fb85c..276f878e 100644 --- a/handler/user_manager_manager_mock_test.go +++ b/handler/user_manager_manager_mock_test.go @@ -3,7 +3,7 @@ package handler import ( - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" mock "github.com/stretchr/testify/mock" ) diff --git a/server/alert.go b/server/alert.go index 21ea5db9..f6f8e38b 100644 --- a/server/alert.go +++ b/server/alert.go @@ -4,7 +4,7 @@ import ( "context" "log/slog" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) func NewAlertRouter(logger *slog.Logger) AlertRouter { diff --git a/server/alert_test.go b/server/alert_test.go index 552a969b..87612bff 100644 --- a/server/alert_test.go +++ b/server/alert_test.go @@ -5,7 +5,7 @@ import ( "context" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" ) diff --git a/server/auth_mock_test.go b/server/auth_mock_test.go index 729e7ccf..8acba5d7 100644 --- a/server/auth_mock_test.go +++ b/server/auth_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" uuid "github.com/google/uuid" ) diff --git a/server/bos_router.go b/server/bos_router.go index 0d9700f7..b288e8ff 100644 --- a/server/bos_router.go +++ b/server/bos_router.go @@ -5,8 +5,8 @@ import ( "errors" "io" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // BOSRootRouter routes client connections to the OSCAR food group routers. diff --git a/server/bos_router_mock_test.go b/server/bos_router_mock_test.go index c8b6eae8..6274a508 100644 --- a/server/bos_router_mock_test.go +++ b/server/bos_router_mock_test.go @@ -8,7 +8,7 @@ import ( mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockBOSRouter is an autogenerated mock type for the BOSRouter type diff --git a/server/bos_service.go b/server/bos_service.go index 05f8ecb9..a92b089f 100644 --- a/server/bos_service.go +++ b/server/bos_service.go @@ -7,8 +7,8 @@ import ( "net" "os" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // BOSRouter is the interface that defines the entrypoint to the BOS service. @@ -83,11 +83,9 @@ func (rt BOSService) handleNewConnection(ctx context.Context, rwc io.ReadWriteCl return errors.New("session not found") } - defer sess.Close() - defer rwc.Close() - - go func() { - <-sess.Closed() + defer func() { + sess.Close() + rwc.Close() if err := rt.Signout(ctx, sess); err != nil { rt.Logger.ErrorContext(ctx, "error notifying departure", "err", err.Error()) } diff --git a/server/bos_service_test.go b/server/bos_service_test.go index d91488cc..236e5561 100644 --- a/server/bos_service_test.go +++ b/server/bos_service_test.go @@ -5,13 +5,12 @@ import ( "context" "io" "log/slog" - "sync" "testing" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/mock" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" ) @@ -36,9 +35,6 @@ func TestBOSService_handleNewConnection(t *testing.T) { clientReader, serverWriter := io.Pipe() serverReader, clientWriter := io.Pipe() - wg := sync.WaitGroup{} - wg.Add(1) - go func() { // < receive FLAPSignonFrame flap := oscar.FLAPFrame{} @@ -91,9 +87,6 @@ func TestBOSService_handleNewConnection(t *testing.T) { Return(sess, nil) authHandler.EXPECT(). Signout(mock.Anything, sess). - Run(func(ctx context.Context, sess *state.Session) { - wg.Done() - }). Return(nil) bosHandler := newMockOServiceBOSHandler(t) @@ -122,6 +115,4 @@ func TestBOSService_handleNewConnection(t *testing.T) { PipeWriter: clientWriter, } assert.NoError(t, rt.handleNewConnection(context.Background(), rwc)) - - wg.Wait() // wait for server to drain the connection } diff --git a/server/bucp.go b/server/bucp.go index 9788d437..d5701ff6 100644 --- a/server/bucp.go +++ b/server/bucp.go @@ -7,8 +7,8 @@ import ( "os" "github.com/google/uuid" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type AuthHandler interface { diff --git a/server/bucp_test.go b/server/bucp_test.go index 710be9ff..45c99bb6 100644 --- a/server/bucp_test.go +++ b/server/bucp_test.go @@ -6,7 +6,7 @@ import ( "log/slog" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/buddy.go b/server/buddy.go index 0b1887f7..5b42c191 100644 --- a/server/buddy.go +++ b/server/buddy.go @@ -5,7 +5,7 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) type BuddyHandler interface { diff --git a/server/buddy_mock_test.go b/server/buddy_mock_test.go index fbbecb5a..4a30a5ff 100644 --- a/server/buddy_mock_test.go +++ b/server/buddy_mock_test.go @@ -5,7 +5,7 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" ) diff --git a/server/buddy_test.go b/server/buddy_test.go index d60f83d6..4800d4f0 100644 --- a/server/buddy_test.go +++ b/server/buddy_test.go @@ -5,7 +5,7 @@ import ( "log/slog" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/chat.go b/server/chat.go index d8b61ad2..e2c3dbd7 100644 --- a/server/chat.go +++ b/server/chat.go @@ -5,8 +5,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type ChatHandler interface { diff --git a/server/chat_mock_test.go b/server/chat_mock_test.go index f76e09d9..54dd4ae3 100644 --- a/server/chat_mock_test.go +++ b/server/chat_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockChatHandler is an autogenerated mock type for the ChatHandler type diff --git a/server/chat_nav.go b/server/chat_nav.go index 1a4b6a93..97bc5fd7 100644 --- a/server/chat_nav.go +++ b/server/chat_nav.go @@ -5,8 +5,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type ChatNavHandler interface { diff --git a/server/chat_nav_mock_test.go b/server/chat_nav_mock_test.go index b9be1d65..e9774b87 100644 --- a/server/chat_nav_mock_test.go +++ b/server/chat_nav_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockChatNavHandler is an autogenerated mock type for the ChatNavHandler type diff --git a/server/chat_nav_test.go b/server/chat_nav_test.go index 3794d1a0..6a02f358 100644 --- a/server/chat_nav_test.go +++ b/server/chat_nav_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/chat_service.go b/server/chat_service.go index ffe4dac8..e618724a 100644 --- a/server/chat_service.go +++ b/server/chat_service.go @@ -8,8 +8,8 @@ import ( "net" "os" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) // ChatServiceRouter is the interface that defines the entrypoint to the BOS service. @@ -57,15 +57,14 @@ func (rt ChatService) Start() { if err := rt.handleNewConnection(ctx, conn); err != nil { rt.Logger.Info("user session failed", "err", err.Error()) } - conn.Close() }() } } -func (rt ChatService) handleNewConnection(ctx context.Context, rw io.ReadWriter) error { +func (rt ChatService) handleNewConnection(ctx context.Context, rwc io.ReadWriteCloser) error { seq := uint32(100) - flap, err := flapSignonHandshake(rw, &seq) + flap, err := flapSignonHandshake(rwc, &seq) if err != nil { return err } @@ -90,16 +89,16 @@ func (rt ChatService) handleNewConnection(ctx context.Context, rw io.ReadWriter) return errors.New("session not found") } - defer chatSess.Close() - go func() { - <-chatSess.Closed() + defer func() { + chatSess.Close() + rwc.Close() if err := rt.SignoutChat(ctx, chatSess, chatID); err != nil { rt.Logger.ErrorContext(ctx, "unable to sign out user", "err", err.Error()) } }() msg := rt.WriteOServiceHostOnline() - if err := sendSNAC(msg.Frame, msg.Body, &seq, rw); err != nil { + if err := sendSNAC(msg.Frame, msg.Body, &seq, rwc); err != nil { return err } @@ -110,6 +109,6 @@ func (rt ChatService) handleNewConnection(ctx context.Context, rw io.ReadWriter) return sendSNAC(msg.Frame, msg.Body, seq, w) } ctx = context.WithValue(ctx, "screenName", chatSess.ScreenName()) - dispatchIncomingMessages(ctx, chatSess, seq, rw, rt.Logger, fnClientReqHandler, fnAlertHandler) + dispatchIncomingMessages(ctx, chatSess, seq, rwc, rt.Logger, fnClientReqHandler, fnAlertHandler) return nil } diff --git a/server/chat_service_router.go b/server/chat_service_router.go index e85b11e8..ce9c8c8a 100644 --- a/server/chat_service_router.go +++ b/server/chat_service_router.go @@ -5,8 +5,8 @@ import ( "errors" "io" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type ChatServiceRooterRouter struct { diff --git a/server/chat_service_router_mock_test.go b/server/chat_service_router_mock_test.go index 708d3fad..31d9d957 100644 --- a/server/chat_service_router_mock_test.go +++ b/server/chat_service_router_mock_test.go @@ -8,7 +8,7 @@ import ( mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockChatServiceRouter is an autogenerated mock type for the ChatServiceRouter type diff --git a/server/chat_service_test.go b/server/chat_service_test.go index a23d8129..0f96f1c4 100644 --- a/server/chat_service_test.go +++ b/server/chat_service_test.go @@ -5,11 +5,10 @@ import ( "context" "io" "log/slog" - "sync" "testing" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -22,9 +21,6 @@ func TestChatService_handleNewConnection(t *testing.T) { clientReader, serverWriter := io.Pipe() serverReader, clientWriter := io.Pipe() - wg := sync.WaitGroup{} - wg.Add(1) - go func() { // < receive FLAPSignonFrame flap := oscar.FLAPFrame{} @@ -81,9 +77,6 @@ func TestChatService_handleNewConnection(t *testing.T) { Return(sess, nil) authHandler.EXPECT(). SignoutChat(mock.Anything, sess, chatCookie). - Run(func(ctx context.Context, sess *state.Session, chatID string) { - wg.Done() - }). Return(nil) chatHandler := newMockOServiceChatHandler(t) @@ -112,6 +105,4 @@ func TestChatService_handleNewConnection(t *testing.T) { PipeWriter: clientWriter, } rt.handleNewConnection(context.Background(), rwc) - - wg.Wait() // wait for server to drain the connection } diff --git a/server/chat_test.go b/server/chat_test.go index 893dda39..4ff39ec0 100644 --- a/server/chat_test.go +++ b/server/chat_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) @@ -78,12 +78,7 @@ func TestChatRouter_RouteChat(t *testing.T) { Return(tc.output, tc.handlerErr). Maybe() - router := ChatRouter{ - ChatHandler: svc, - RouteLogger: RouteLogger{ - Logger: NewLogger(Config{}), - }, - } + router := NewChatRouter(NewLogger(Config{}), svc) bufIn := &bytes.Buffer{} assert.NoError(t, oscar.Marshal(tc.input.Body, bufIn)) diff --git a/server/connection.go b/server/connection.go index aefbb97c..71e4343e 100644 --- a/server/connection.go +++ b/server/connection.go @@ -7,8 +7,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) var ( diff --git a/server/connection_test.go b/server/connection_test.go index a2506197..c75bd7cd 100644 --- a/server/connection_test.go +++ b/server/connection_test.go @@ -8,8 +8,8 @@ import ( "sync" "testing" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/assert" ) diff --git a/server/feedbag.go b/server/feedbag.go index 8b0e3489..62fe53f9 100644 --- a/server/feedbag.go +++ b/server/feedbag.go @@ -5,8 +5,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type FeedbagHandler interface { diff --git a/server/feedbag_mock_test.go b/server/feedbag_mock_test.go index d3335dbb..76c9a2cd 100644 --- a/server/feedbag_mock_test.go +++ b/server/feedbag_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockFeedbagHandler is an autogenerated mock type for the FeedbagHandler type diff --git a/server/feedbag_test.go b/server/feedbag_test.go index 65b31bfc..7ae4ce23 100644 --- a/server/feedbag_test.go +++ b/server/feedbag_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/icbm.go b/server/icbm.go index 4f32a83c..38c0ee53 100644 --- a/server/icbm.go +++ b/server/icbm.go @@ -5,8 +5,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type ICBMHandler interface { diff --git a/server/icbm_mock_test.go b/server/icbm_mock_test.go index 72c18fd1..83c85052 100644 --- a/server/icbm_mock_test.go +++ b/server/icbm_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockICBMHandler is an autogenerated mock type for the ICBMHandler type diff --git a/server/icbm_test.go b/server/icbm_test.go index 7aa0c278..2da70697 100644 --- a/server/icbm_test.go +++ b/server/icbm_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/locate.go b/server/locate.go index a546ec28..fe07027a 100644 --- a/server/locate.go +++ b/server/locate.go @@ -5,8 +5,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type LocateHandler interface { diff --git a/server/locate_mock_test.go b/server/locate_mock_test.go index bc4514db..ce726313 100644 --- a/server/locate_mock_test.go +++ b/server/locate_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockLocateHandler is an autogenerated mock type for the LocateHandler type diff --git a/server/locate_test.go b/server/locate_test.go index 348e5bc3..ec736c73 100644 --- a/server/locate_test.go +++ b/server/locate_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/logging.go b/server/logging.go index 09df5659..af5b9d50 100644 --- a/server/logging.go +++ b/server/logging.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) const ( diff --git a/server/mgmt_api.go b/server/mgmt_api.go index 09b7a077..32cd87d0 100644 --- a/server/mgmt_api.go +++ b/server/mgmt_api.go @@ -8,7 +8,7 @@ import ( "os" "github.com/google/uuid" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/state" ) type UserManager interface { diff --git a/server/mgmt_api_test.go b/server/mgmt_api_test.go index 02ee2da4..3766cab9 100644 --- a/server/mgmt_api_test.go +++ b/server/mgmt_api_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/state" "github.com/stretchr/testify/mock" ) diff --git a/server/oservice.go b/server/oservice.go index a33b1da8..82b2134d 100644 --- a/server/oservice.go +++ b/server/oservice.go @@ -6,8 +6,8 @@ import ( "io" "log/slog" - "github.com/mkaminski/goaim/oscar" - "github.com/mkaminski/goaim/state" + "github.com/mw0x7/retro-aim-server/oscar" + "github.com/mw0x7/retro-aim-server/state" ) type OServiceHandler interface { diff --git a/server/oservice_bos_mock_test.go b/server/oservice_bos_mock_test.go index 039eb529..6a401fe7 100644 --- a/server/oservice_bos_mock_test.go +++ b/server/oservice_bos_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockOServiceBOSHandler is an autogenerated mock type for the OServiceBOSHandler type diff --git a/server/oservice_chat_mock_test.go b/server/oservice_chat_mock_test.go index ed8a8f5c..73d3e79e 100644 --- a/server/oservice_chat_mock_test.go +++ b/server/oservice_chat_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockOServiceChatHandler is an autogenerated mock type for the OServiceChatHandler type diff --git a/server/oservice_mock_test.go b/server/oservice_mock_test.go index 67fbf449..26fd22c8 100644 --- a/server/oservice_mock_test.go +++ b/server/oservice_mock_test.go @@ -5,10 +5,10 @@ package server import ( context "context" - oscar "github.com/mkaminski/goaim/oscar" + oscar "github.com/mw0x7/retro-aim-server/oscar" mock "github.com/stretchr/testify/mock" - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" ) // mockOServiceHandler is an autogenerated mock type for the OServiceHandler type diff --git a/server/oservice_test.go b/server/oservice_test.go index a0e807ce..a3964e4a 100644 --- a/server/oservice_test.go +++ b/server/oservice_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) diff --git a/server/user_manager_mock_test.go b/server/user_manager_mock_test.go index 89707560..fc07cd31 100644 --- a/server/user_manager_mock_test.go +++ b/server/user_manager_mock_test.go @@ -3,7 +3,7 @@ package server import ( - state "github.com/mkaminski/goaim/state" + state "github.com/mw0x7/retro-aim-server/state" mock "github.com/stretchr/testify/mock" ) diff --git a/state/chat_registry.go b/state/chat_registry.go index 2c3e7d5b..fc6a5b19 100644 --- a/state/chat_registry.go +++ b/state/chat_registry.go @@ -7,7 +7,7 @@ import ( "time" "github.com/google/uuid" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) // ErrChatRoomNotFound indicates that a chat room lookup failed. diff --git a/state/chat_registry_test.go b/state/chat_registry_test.go index 27133e0b..344e5e37 100644 --- a/state/chat_registry_test.go +++ b/state/chat_registry_test.go @@ -3,7 +3,7 @@ package state import ( "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" ) diff --git a/state/session.go b/state/session.go index 93a520b1..fdefded6 100644 --- a/state/session.go +++ b/state/session.go @@ -5,7 +5,7 @@ import ( "time" "github.com/google/uuid" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) // capChat is a UID that indicates a client supports the chat capability diff --git a/state/session_manager.go b/state/session_manager.go index fd64b9f4..a1fbf406 100644 --- a/state/session_manager.go +++ b/state/session_manager.go @@ -5,7 +5,7 @@ import ( "log/slog" "sync" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) // InMemorySessionManager handles the lifecycle of a user session and provides diff --git a/state/session_manager_test.go b/state/session_manager_test.go index c2d57049..ab95df54 100644 --- a/state/session_manager_test.go +++ b/state/session_manager_test.go @@ -5,7 +5,7 @@ import ( "log/slog" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" ) diff --git a/state/session_test.go b/state/session_test.go index 878ec2ff..e98c1e7c 100644 --- a/state/session_test.go +++ b/state/session_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" ) diff --git a/state/user_store.go b/state/user_store.go index f4049a4f..5f70d266 100644 --- a/state/user_store.go +++ b/state/user_store.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" _ "github.com/mattn/go-sqlite3" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" ) var userStoreDDL = ` diff --git a/state/user_store_test.go b/state/user_store_test.go index 5e0662bb..95fa500d 100644 --- a/state/user_store_test.go +++ b/state/user_store_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/mkaminski/goaim/oscar" + "github.com/mw0x7/retro-aim-server/oscar" "github.com/stretchr/testify/assert" )