Skip to content

Commit

Permalink
chore: replace last_message_at with last_updated (#2282)
Browse files Browse the repository at this point in the history
* chore: replace last_message_at with last_updated

* fix: keep the same order as before
  • Loading branch information
santhoshvai authored Nov 6, 2023
1 parent 97e9c46 commit d446e67
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
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

0 comments on commit d446e67

Please sign in to comment.