Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out global team conversations for API v1 and v2. #2875

Closed
wants to merge 5 commits into from

Conversation

elland
Copy link
Contributor

@elland elland commented Nov 28, 2022

Builds upon #2872

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@elland elland temporarily deployed to cachix November 28, 2022 10:56 Inactive
@elland elland temporarily deployed to cachix November 28, 2022 10:56 Inactive
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Nov 28, 2022
createGroup alice1 gid
void $ createAddCommit alice1 [] >>= sendAndConsumeCommitBundle

-- Now we should have the user as part of that conversation also in the backend
Copy link
Contributor

@smatting smatting Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment should read differently, I think. The GTC is not listed for that user

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other way around, it should list for this user, since we're calling the right version of the API, no?

@elland elland temporarily deployed to cachix November 28, 2022 13:55 Inactive
@elland elland temporarily deployed to cachix November 28, 2022 13:55 Inactive
@elland elland temporarily deployed to cachix November 28, 2022 13:59 Inactive
@elland elland temporarily deployed to cachix November 28, 2022 13:59 Inactive
@elland elland force-pushed the elland/do-not-list-gtc-pre-v3 branch from 431635d to 348573b Compare November 28, 2022 14:15
@elland elland temporarily deployed to cachix November 28, 2022 14:15 Inactive
@elland elland temporarily deployed to cachix November 28, 2022 14:15 Inactive
Copy link
Contributor

@pcapriotti pcapriotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right to me. Since the normal listing function is not seeing the GTC, we can simply add it manually at the beginning (or the end) of the list we return, without the need for any special tricks.

E.getUserTeams (tUnqualified lusr) >>= mapM (pure . Data.globalTeamConv)

-- implicitly add user to the global team conv, so it gets listed.
for_ gtcIds $ \tid -> E.createMembers tid (UserList [tUnqualified lusr] mempty)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the idea was that the GTC never has any explicit members.

@elland elland closed this Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants