Skip to content

Commit

Permalink
feat: quick_replies -> suggested_replies
Browse files Browse the repository at this point in the history
  • Loading branch information
AhyoungRyu committed Sep 18, 2023
1 parent c7708ce commit accb32f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const customConstants = {
{
data: [
{
quick_replies: [
suggested_replies: [
'What can I learn from Pre-K 8th grade?',
'Tell me about Math',
],
Expand Down
8 changes: 4 additions & 4 deletions src/components/CustomChannelComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type MessageMeta =
| {
stream: boolean;
}
| { quick_replies?: string[] };
| { suggested_replies?: string[] };

export function CustomChannelComponent(props: CustomChannelComponentProps) {
const { botUser, createGroupChannel } = props;
Expand Down Expand Up @@ -79,9 +79,9 @@ export function CustomChannelComponent(props: CustomChannelComponentProps) {

const dynamicReplyOptions =
lastMessageMeta != null &&
'quick_replies' in lastMessageMeta &&
lastMessageMeta.quick_replies != null
? lastMessageMeta.quick_replies
'suggested_replies' in lastMessageMeta &&
lastMessageMeta.suggested_replies != null
? lastMessageMeta.suggested_replies
: [];

const isStaticReplyVisible =
Expand Down
4 changes: 2 additions & 2 deletions src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const DEFAULT_CONSTANT: Constant = {
firstMessageData: [
// {
// data: {
// quick_replies: [
// suggested_replies: [
// 'What can I learn from Pre-K 8th grade?',
// 'Tell me about Math',
// ],
Expand Down Expand Up @@ -116,7 +116,7 @@ type ConfigureSession = (
) => SessionHandler;

type MessageData = {
quick_replies?: string[];
suggested_replies?: string[];
};

type FirstMessageItem = {
Expand Down

0 comments on commit accb32f

Please sign in to comment.