会话分组及聊天室实现
This commit is contained in:
@@ -66,13 +66,8 @@ data class AccountProfile(
|
||||
followerCount = followerCount,
|
||||
followingCount = followingCount,
|
||||
nickName = nickname,
|
||||
avatar = if (aiAccount) {
|
||||
// 对于AI账户,直接使用原始头像URL,不添加服务器前缀
|
||||
"${ApiClient.BASE_API_URL+"/outside"}$avatar"+"?token="+"Bearer ${AppStore.token}"
|
||||
} else {
|
||||
// 对于普通用户,添加服务器前缀
|
||||
"${ApiClient.BASE_SERVER}$avatar"
|
||||
},
|
||||
avatar =
|
||||
"${ApiClient.BASE_SERVER}$avatar",
|
||||
bio = bio,
|
||||
country = "Worldwide",
|
||||
isFollowing = isFollowing,
|
||||
|
||||
@@ -37,7 +37,7 @@ data class Agent(
|
||||
desc = desc,
|
||||
createdAt = createdAt,
|
||||
updatedAt = updatedAt,
|
||||
avatar = "${ApiClient.BASE_API_URL+"/outside"}$avatar"+"?token="+"Bearer ${AppStore.token}",
|
||||
avatar = "${ApiClient.BASE_API_URL+"/outside"}$avatar"+"?token="+"${AppStore.token}",
|
||||
//author = author,
|
||||
isPublic = isPublic,
|
||||
openId = openId,
|
||||
|
||||
@@ -55,7 +55,7 @@ interface UserService {
|
||||
* @return 用户信息
|
||||
*/
|
||||
|
||||
suspend fun getUserProfileByTrtcUserId(id: String):AccountProfileEntity
|
||||
suspend fun getUserProfileByTrtcUserId(id: String,includeAI: Int):AccountProfileEntity
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
@@ -107,8 +107,8 @@ class UserServiceImpl : UserService {
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun getUserProfileByTrtcUserId(id: String): AccountProfileEntity {
|
||||
val resp = ApiClient.api.getAccountProfileByTrtcUserId(id)
|
||||
override suspend fun getUserProfileByTrtcUserId(id: String,includeAI: Int): AccountProfileEntity {
|
||||
val resp = ApiClient.api.getAccountProfileByTrtcUserId(id,includeAI)
|
||||
val body = resp.body() ?: throw ServiceException("Failed to get account")
|
||||
return body.data.toAccountProfileEntity()
|
||||
}
|
||||
|
||||
@@ -51,6 +51,9 @@ data class SendChatAiRequestBody(
|
||||
val toTrtcUserId: String,
|
||||
@SerializedName("message")
|
||||
val message: String,
|
||||
@SerializedName("skipTrtc")
|
||||
val skipTrtc: Boolean,
|
||||
|
||||
)
|
||||
|
||||
data class LoginUserRequestBody(
|
||||
@@ -380,7 +383,8 @@ interface RaveNowAPI {
|
||||
|
||||
@GET("profile/trtc/{id}")
|
||||
suspend fun getAccountProfileByTrtcUserId(
|
||||
@Path("id") id: String
|
||||
@Path("id") id: String,
|
||||
@Query("includeAI") includeAI: Int
|
||||
): Response<DataContainer<AccountProfile>>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user