Skip to content

Commit 38c1b6b

Browse files
authored
Merge pull request #4064 from nextcloud/create_new_conversation
Create new conversation
2 parents 192da37 + 2fbe3db commit 38c1b6b

19 files changed

Lines changed: 1391 additions & 155 deletions

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ dependencies {
309309
//compose
310310
implementation(platform("androidx.compose:compose-bom:2024.09.00"))
311311
implementation("androidx.compose.ui:ui")
312-
implementation 'androidx.compose.material3:material3'
312+
implementation 'androidx.compose.material3:material3:1.2.1'
313313
implementation("androidx.compose.ui:ui-tooling-preview")
314314
implementation 'androidx.activity:activity-compose:1.9.2'
315315
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.5'

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
<activity android:name=".contacts.ContactsActivityCompose"
130130
android:theme="@style/AppTheme"/>
131131

132+
<activity android:name=".conversationcreation.ConversationCreationActivity"
133+
android:theme="@style/AppTheme"/>
134+
132135
<activity
133136
android:name=".account.AccountVerificationActivity"
134137
android:theme="@style/AppTheme" />

app/src/main/java/com/nextcloud/talk/api/NcApiCoroutines.kt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ package com.nextcloud.talk.api
99

1010
import com.nextcloud.talk.models.json.autocomplete.AutocompleteOverall
1111
import com.nextcloud.talk.models.json.conversations.RoomOverall
12+
import com.nextcloud.talk.models.json.generic.GenericOverall
13+
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
14+
import retrofit2.http.DELETE
15+
import retrofit2.http.Field
16+
import retrofit2.http.FormUrlEncoded
1217
import retrofit2.http.GET
1318
import retrofit2.http.Header
1419
import retrofit2.http.POST
20+
import retrofit2.http.PUT
1521
import retrofit2.http.Query
1622
import retrofit2.http.QueryMap
1723
import retrofit2.http.Url
@@ -39,4 +45,55 @@ interface NcApiCoroutines {
3945
@Url url: String?,
4046
@QueryMap options: Map<String, String>?
4147
): RoomOverall
48+
49+
/*
50+
QueryMap items are as follows:
51+
- "roomName" : "newName"
52+
53+
Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken
54+
*/
55+
@FormUrlEncoded
56+
@PUT
57+
suspend fun renameRoom(
58+
@Header("Authorization") authorization: String?,
59+
@Url url: String,
60+
@Field("roomName") roomName: String?
61+
): GenericOverall
62+
63+
@FormUrlEncoded
64+
@PUT
65+
suspend fun openConversation(
66+
@Header("Authorization") authorization: String?,
67+
@Url url: String,
68+
@Field("scope") scope: Int
69+
): GenericOverall
70+
71+
@FormUrlEncoded
72+
@PUT
73+
suspend fun setConversationDescription(
74+
@Header("Authorization") authorization: String?,
75+
@Url url: String,
76+
@Field("description") description: String?
77+
): GenericOverall
78+
79+
@POST
80+
suspend fun addParticipant(
81+
@Header("Authorization") authorization: String?,
82+
@Url url: String?,
83+
@QueryMap options: Map<String, String>?
84+
): AddParticipantOverall
85+
86+
@POST
87+
suspend fun makeRoomPublic(@Header("Authorization") authorization: String?, @Url url: String): GenericOverall
88+
89+
@DELETE
90+
suspend fun makeRoomPrivate(@Header("Authorization") authorization: String?, @Url url: String): GenericOverall
91+
92+
@FormUrlEncoded
93+
@PUT
94+
suspend fun setPassword(
95+
@Header("Authorization") authorization: String?,
96+
@Url url: String?,
97+
@Field("password") password: String?
98+
): GenericOverall
4299
}

0 commit comments

Comments
 (0)