Skip to content

Commit

Permalink
Merge pull request #4064 from nextcloud/create_new_conversation
Browse files Browse the repository at this point in the history
Create new conversation
  • Loading branch information
mahibi authored Sep 5, 2024
2 parents 192da37 + 2fbe3db commit 38c1b6b
Show file tree
Hide file tree
Showing 19 changed files with 1,391 additions and 155 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ dependencies {
//compose
implementation(platform("androidx.compose:compose-bom:2024.09.00"))
implementation("androidx.compose.ui:ui")
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material3:material3:1.2.1'
implementation("androidx.compose.ui:ui-tooling-preview")
implementation 'androidx.activity:activity-compose:1.9.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.5'
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
<activity android:name=".contacts.ContactsActivityCompose"
android:theme="@style/AppTheme"/>

<activity android:name=".conversationcreation.ConversationCreationActivity"
android:theme="@style/AppTheme"/>

<activity
android:name=".account.AccountVerificationActivity"
android:theme="@style/AppTheme" />
Expand Down
57 changes: 57 additions & 0 deletions app/src/main/java/com/nextcloud/talk/api/NcApiCoroutines.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ package com.nextcloud.talk.api

import com.nextcloud.talk.models.json.autocomplete.AutocompleteOverall
import com.nextcloud.talk.models.json.conversations.RoomOverall
import com.nextcloud.talk.models.json.generic.GenericOverall
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
import retrofit2.http.DELETE
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Query
import retrofit2.http.QueryMap
import retrofit2.http.Url
Expand Down Expand Up @@ -39,4 +45,55 @@ interface NcApiCoroutines {
@Url url: String?,
@QueryMap options: Map<String, String>?
): RoomOverall

/*
QueryMap items are as follows:
- "roomName" : "newName"
Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken
*/
@FormUrlEncoded
@PUT
suspend fun renameRoom(
@Header("Authorization") authorization: String?,
@Url url: String,
@Field("roomName") roomName: String?
): GenericOverall

@FormUrlEncoded
@PUT
suspend fun openConversation(
@Header("Authorization") authorization: String?,
@Url url: String,
@Field("scope") scope: Int
): GenericOverall

@FormUrlEncoded
@PUT
suspend fun setConversationDescription(
@Header("Authorization") authorization: String?,
@Url url: String,
@Field("description") description: String?
): GenericOverall

@POST
suspend fun addParticipant(
@Header("Authorization") authorization: String?,
@Url url: String?,
@QueryMap options: Map<String, String>?
): AddParticipantOverall

@POST
suspend fun makeRoomPublic(@Header("Authorization") authorization: String?, @Url url: String): GenericOverall

@DELETE
suspend fun makeRoomPrivate(@Header("Authorization") authorization: String?, @Url url: String): GenericOverall

@FormUrlEncoded
@PUT
suspend fun setPassword(
@Header("Authorization") authorization: String?,
@Url url: String?,
@Field("password") password: String?
): GenericOverall
}
Loading

0 comments on commit 38c1b6b

Please sign in to comment.