feat(dm): recipientId 계약을 추가한다
This commit is contained in:
@@ -5,7 +5,8 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
@Keep
|
||||
data class CreateDmChatRoomRequest(
|
||||
@SerializedName("creatorId") val creatorId: Long
|
||||
@SerializedName("recipientId") val recipientId: Long? = null,
|
||||
@SerializedName("creatorId") val creatorId: Long? = null
|
||||
)
|
||||
|
||||
@Keep
|
||||
|
||||
@@ -18,6 +18,14 @@ class DmChatRepository(
|
||||
request = CreateDmChatRoomRequest(creatorId = creatorId)
|
||||
)
|
||||
|
||||
fun createOrGetRoomByRecipientId(
|
||||
token: String,
|
||||
recipientId: Long
|
||||
): Single<ApiResponse<CreateDmChatRoomResponse>> = api.createDmChatRoom(
|
||||
authHeader = bearer(token),
|
||||
request = CreateDmChatRoomRequest(recipientId = recipientId)
|
||||
)
|
||||
|
||||
fun openRoom(
|
||||
token: String,
|
||||
roomId: Long,
|
||||
|
||||
Reference in New Issue
Block a user