Skip to content

Commit

Permalink
client: Implement Disconnect/Logout/IsLoggedIn/IsThisUser
Browse files Browse the repository at this point in the history
  • Loading branch information
purpshell committed Oct 9, 2024
1 parent 80f9369 commit 3f647b6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,23 @@ func (tc *TwitterClient) Connect(ctx context.Context) error {
}

func (tc *TwitterClient) Disconnect() {
//TODO implement me
panic("implement me")
tc.client.Disconnect()
}

func (tc *TwitterClient) IsLoggedIn() bool {
//TODO implement me
panic("implement me")
return tc.client.IsLoggedIn()
}

func (tc *TwitterClient) LogoutRemote(ctx context.Context) {
//TODO implement me
panic("implement me")
log := zerolog.Ctx(ctx)
_, err := tc.client.Logout()
if err != nil {
log.Error().Err(err).Msg("error logging out")
}
}

func (tc *TwitterClient) IsThisUser(ctx context.Context, userID networkid.UserID) bool {
//TODO implement me
panic("implement me")
func (tc *TwitterClient) IsThisUser(_ context.Context, userID networkid.UserID) bool {
return networkid.UserID(tc.client.GetCurrentUserID()) == userID
}

func (tc *TwitterClient) GetChatInfo(ctx context.Context, portal *bridgev2.Portal) (*bridgev2.ChatInfo, error) {
Expand Down

0 comments on commit 3f647b6

Please sign in to comment.