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

Issue with channel sort and public channels #2603

Open
Annastrin opened this issue Jan 16, 2025 · 2 comments
Open

Issue with channel sort and public channels #2603

Annastrin opened this issue Jan 16, 2025 · 2 comments

Comments

@Annastrin
Copy link
Contributor

We have some weird issue with our channel sort and public and announcement channels (not-messaging channels) on development app.

We are using this sort:
const sort: ChannelSort = [{ pinned_at: -1 }, { last_updated_at: -1 }, { last_message_at: -1 }];
and this channel filters:

const channelsFilters: ChannelFilters = {
    $or: [
      {
        type: "public",
        members: { $in: [user.id] },
      },
      {
        cid: { $in: PublicChannels },
      },
    ],
  };

For some reason, channels from production app do appear, but development app channels of the same type and cid don't appear until I remove { pinned_at: -1 }.

So, with the const sort: ChannelSort = [{ last_updated_at: -1 }, { last_message_at: -1 }]; I can see those channels.

What might be the reason of this issue?

@MartinCupela
Copy link
Contributor

Hello @Annastrin , I have few questions:

  1. Do the dev app channels appear if you change type from "public" to some other channel type (in case you are using other channel types)?
  2. Do both dev and prod channels have pinned_at value defined?
  3. Are there any data-related differences btw dev and prod channels?

Thank you

@Annastrin
Copy link
Contributor Author

Annastrin commented Jan 17, 2025

Thank you for your quick response, @MartinCupela.

  1. Is there a documentation on how to change channels type from 'public' to 'messaging'? I've tried with updatePartial, but it didn't work: "UpdateChannelPartial failed with error: \"field type is reserved and cannot updated\"". Actually, it would be very useful if we could change the type of channels from 'messaging' to 'public' and vice versa.
  2. I'm not sure about this. How can we define pinned_at?
  3. No, there isn't any data-related difference between them.

Some additional information: there are no members in those specific public channels, we display them to all our users based on the channels' cid. But we still would like users to be able to pin those channels or hide them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants