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

chore: replace last_message_at with last_updated #2282

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can sort a query on [built-in](https://getstream.io/chat/docs/javascript/que
#### Example

```tsx
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };
```

:::note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native';

const client = StreamChat.getInstance('api_key');
const filters = { members: { $in: [ 'vishal', 'lucas', 'neil' ] } };
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };
const options = { limit: 20, messages_limit: 30 };

export const App = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can sort a query on [built-in](https://getstream.io/chat/docs/javascript/que
#### Example

```tsx
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };
```

:::note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native';

const client = StreamChat.getInstance('api_key');
const filters = { members: { $in: [ 'vishal', 'lucas', 'neil' ] } };
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };
const options = { limit: 20, messages_limit: 30 };

export const App = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can sort a query on [built-in](https://getstream.io/chat/docs/javascript/que
#### Example

```tsx
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };
```

:::note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import { ChannelList, Chat, OverlayProvider } from 'stream-chat-react-native';

const client = StreamChat.getInstance('api_key');
const filters = { members: { $in: [ 'vishal', 'lucas', 'neil' ] } };
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };
const options = { limit: 20, messages_limit: 30 };

export const App = () =>
Expand Down
2 changes: 1 addition & 1 deletion examples/ExpoMessaging/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const filters = {
members: { $in: [user.id] },
type: 'messaging',
};
const sort: ChannelSort<StreamChatGenerics> = { last_message_at: -1 };
const sort: ChannelSort<StreamChatGenerics> = { last_updated: -1 };
const options = {
state: true,
watch: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/SampleApp/src/screens/ChannelListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const styles = StyleSheet.create({
const baseFilters = {
type: 'messaging',
};
const sort: ChannelSort<StreamChatGenerics> = { last_message_at: -1 };
const sort: ChannelSort<StreamChatGenerics> = { last_updated: -1 };
const options = {
presence: true,
state: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/SampleApp/src/screens/SharedGroupsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const SharedGroupsScreen: React.FC<SharedGroupsScreenProps> = ({
}}
Preview={CustomPreview}
sort={{
last_message_at: -1,
last_updated: -1,
}}
/>
</View>
Expand Down
2 changes: 1 addition & 1 deletion examples/TypeScriptMessaging/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const filters = {
members: { $in: ['ron'] },
type: 'messaging',
};
const sort: ChannelSort<StreamChatGenerics> = { last_message_at: -1 };
const sort: ChannelSort<StreamChatGenerics> = { last_updated: -1 };

/**
* Start playing with streami18n instance here:
Expand Down
2 changes: 1 addition & 1 deletion package/src/__tests__/offline-support/offline-feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const Generic = () => {
foo: 'bar',
type: 'messaging',
};
const sort = { last_message_at: 1 };
const sort = { last_updated: 1 };

const renderComponent = () =>
render(
Expand Down
2 changes: 1 addition & 1 deletion package/src/components/docs/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const suggestionsContext = {
};

const filters = { example: 1, type: 'team' };
const sort = { last_message_at: -1 };
const sort = { last_updated: -1 };

export const channels = client.queryChannels(filters, sort, {
subscribe: true,
Expand Down
Loading