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

native: use channel.meta to store custom channel config on API #4371

Draft
wants to merge 27 commits into
base: release-channels-updates
Choose a base branch
from

Conversation

davidisaaclee
Copy link
Contributor

@davidisaaclee davidisaaclee commented Jan 27, 2025

fixes TLON-3290

Diff stinks – this branch necessarily was branched off of develop (for latest custom channels code), and has release-channels-updates merged into it; but release-channels-updates does not have latest develop. Comparing this branch to develop (which is the current state) includes all of release-channels-updates; comparing this branch to release-channel-updates includes all commits in develop which are not in release-channel-updates.

814aaa8 should be the start of this branch's changes.


Updates custom channel API code to use new meta field on channel instead of putting a structured string in description.

  • Since channel.meta is only in channels app and not groups (nor DMs), I removed a number of places where we were populating content cfg from group's channel's descriptions or DM's description
  • There are some changes to the API types (ChannelMetadata, ContentRenderer) – these are safe, since the backend treats all of the data in channel.meta as an opaque string (and there are no prod clients that have already stored data in one of these types)
  • Use groups-ui /v5/initgroups-ui /v5/init was added to include channel.meta in the init payload; we use this to seed the channel content config when loading client data for the first time.
  • Extras

davidisaaclee and others added 24 commits January 21, 2025 10:44
This avoids issues where we have a ChannelMetadata and want to pass it
to a function that previously required a (narrower)
ChannelMetadataSchemaV1 argument.
We don't have any UI that allows configuring a custom channel on
creation, so no need to keep this around.
@davidisaaclee davidisaaclee changed the title Dil/integrate custom meta native: use channel.meta to store custom channel config on API Jan 27, 2025
@davidisaaclee
Copy link
Contributor Author

davidisaaclee commented Jan 27, 2025

This branch currently has this bug:

  • i have a group hosted on ship A
  • ship A sees the correct, populated meta for a custom channel in this group via /v5/init
  • ship B is added to that group; /v5/init for ship B shows meta: null

so ship B does not get the customizations when they join (and I don't think they will resolve the customizations until someone makes a change to the meta)

Copy link

linear bot commented Feb 10, 2025

@arthyn arthyn changed the base branch from develop to release-channels-updates March 4, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants