Skip to content

Conversation

@nijeesh-stream
Copy link
Contributor

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

From Js SDK

export type ChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
  channel: ChannelResponse<StreamChatGenerics>;
  members: ChannelMemberResponse<StreamChatGenerics>[];
  messages: MessageResponse<StreamChatGenerics>[];
  pinned_messages: MessageResponse<StreamChatGenerics>[];
  hidden?: boolean;
  membership?: ChannelMemberResponse<StreamChatGenerics> | null;
  pending_messages?: PendingMessageResponse<StreamChatGenerics>[];
  push_preferences?: PushPreference;
  read?: ReadResponse<StreamChatGenerics>[];
  threads?: ThreadResponse[];
  watcher_count?: number;
  watchers?: UserResponse<StreamChatGenerics>[];
};

From Go SDK

type queryChannelResponseData struct {
	Channel         *Channel         `json:"channel"`
	Messages        []*Message       `json:"messages"`
	Read            []*ChannelRead   `json:"read"`
	Members         []*ChannelMember `json:"members"`
}

The Go SDK was missing these keys in the queryChannelResponse

  • pending_messages
  • pinned_messages
  • push_preferences
  • threads
  • watcher_count
  • watchers
  • hidden

To keep the consistency between the SDKs and to avoid further customer requests like this in the future i have added these as well.

Note

I haven't added threads type yet, since any of the threads endpoints aren't implemented on GO SDK yet.

@nijeesh-stream nijeesh-stream marked this pull request as ready for review April 7, 2025 08:24
@nijeesh-stream nijeesh-stream merged commit 9036c50 into master Apr 7, 2025
5 checks passed
@nijeesh-stream nijeesh-stream deleted the feature/CHA-793_pending_message_visibility branch April 7, 2025 08:24
@github-actions github-actions bot mentioned this pull request Apr 7, 2025
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.

2 participants