feat: support rename conversation (#1056)
This commit is contained in:
@@ -73,6 +73,10 @@ export const delConversation = async (isInstalledApp: boolean, installedAppId =
|
||||
return getAction('del', isInstalledApp)(getUrl(`conversations/${id}`, isInstalledApp, installedAppId))
|
||||
}
|
||||
|
||||
export const renameConversation = async (isInstalledApp: boolean, installedAppId = '', id: string, name: string) => {
|
||||
return getAction('post', isInstalledApp)(getUrl(`conversations/${id}/name`, isInstalledApp, installedAppId), { body: { name } })
|
||||
}
|
||||
|
||||
export const fetchChatList = async (conversationId: string, isInstalledApp: boolean, installedAppId = '') => {
|
||||
return getAction('get', isInstalledApp)(getUrl('messages', isInstalledApp, installedAppId), { params: { conversation_id: conversationId, limit: 20, last_id: '' } })
|
||||
}
|
||||
|
@@ -45,6 +45,10 @@ export const delConversation = async (id: string) => {
|
||||
return del(getUrl(`conversations/${id}`))
|
||||
}
|
||||
|
||||
export const renameConversation = async (id: string, name: string) => {
|
||||
return post(getUrl(`conversations/${id}/name`), { body: { name } })
|
||||
}
|
||||
|
||||
export const fetchChatList = async (conversationId: string) => {
|
||||
return get(getUrl('messages'), { params: { conversation_id: conversationId, limit: 20, last_id: '' } })
|
||||
}
|
||||
|
Reference in New Issue
Block a user