Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
chore:removed more chat parts (#1617)
Browse files Browse the repository at this point in the history
* removed more chat parts

* removed a now obsolete test
  • Loading branch information
CommanderStorm authored Sep 17, 2023
1 parent 34199d6 commit 44cb00d
Show file tree
Hide file tree
Showing 31 changed files with 1 addition and 1,958 deletions.
21 changes: 0 additions & 21 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,6 @@
android:label="@string/activity_create_event_title"
android:parentActivityName=".component.tumui.calendar.CalendarActivity">
</activity>

<activity
android:name=".component.ui.chat.activity.JoinRoomScanActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:parentActivityName=".component.ui.chat.activity.ChatRoomsActivity"
android:theme="@style/AppThemeFullscreen">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.tum.in.tumcampusapp.component.ui.chat.activity.ChatRoomsActivity" />
</activity>
<activity
android:name=".component.ui.alarm.AlarmActivity"
android:configChanges="orientation|screenSize"
Expand Down Expand Up @@ -391,15 +379,6 @@
android:launchMode="singleTop"
android:parentActivityName=".component.tumui.feedback.FeedbackActivity"
android:theme="@style/AppTheme.NoDrawerLayout" />
<activity
android:name=".component.ui.chat.AddChatMemberActivity"
android:label="Add Participant"
android:parentActivityName=".component.ui.chat.activity.ChatActivity"
android:theme="@style/AppTheme.NoDrawerLayout">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".component.ui.chat.activity.ChatActivity" />
</activity> <!-- receiver for the mensaWidget -->
<receiver
android:name=".component.ui.cafeteria.widget.MensaWidget"
android:label="@string/mensa_widget"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,60 +63,11 @@
import static de.tum.in.tumcampusapp.api.app.TUMCabeClient.API_UPDATE_NOTE;

public interface TUMCabeAPIService {

//Group chat
@POST(API_CHAT_ROOMS)
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<ChatRoom> createRoom(@Body TUMCabeVerification verification);

@POST(API_CHAT_ROOMS + "{room}/leave/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<ChatRoom> leaveChatRoom(@Path("room") int roomId, @Body TUMCabeVerification verification);

@POST(API_CHAT_ROOMS + "{room}/add/{member}")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<ChatRoom> addUserToChat(@Path("room") int roomId, @Path("member") int userId, @Body TUMCabeVerification verification);

//Get/Update single message
@PUT(API_CHAT_ROOMS + "{room}/message/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<ChatMessage> sendMessage(@Path("room") int roomId, @Body TUMCabeVerification message);

@PUT(API_CHAT_ROOMS + "{room}/message/{message}/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<ChatMessage> updateMessage(@Path("room") int roomId, @Path("message") int messageId, @Body TUMCabeVerification message);

//Get all recent messages or older ones
@POST(API_CHAT_ROOMS + "{room}/messages/{page}/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<List<ChatMessage>> getMessages(@Path("room") int roomId, @Path("page") long messageId, @Body TUMCabeVerification verification);

@POST(API_CHAT_ROOMS + "{room}/messages/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Observable<List<ChatMessage>> getNewMessages(@Path("room") int roomId, @Body TUMCabeVerification verification);

@POST(API_CHAT_MEMBERS)
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
/// This endpoint won't be avaliable in the v2 backend
Call<ChatMember> createMember(@Body ChatMember chatMember);

@GET(API_CHAT_MEMBERS + "{lrz_id}/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<ChatMember> getMember(@Path("lrz_id") String lrzId);

@GET(API_CHAT_MEMBERS + "search/{query}/")
@Deprecated
/// This endpoint won't be avaliable in the v2 backend
Call<List<ChatMember>> searchMemberByName(@Path("query") String nameQuery);

@POST(API_MEMBERS + "uploadIds/{lrzId}/")
Observable<TUMCabeStatus> uploadObfuscatedIds(@Path("lrzId") String lrzId, @Body ObfuscatedIdsUpload ids);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ private static TUMCabeVerification getVerification(Context context, @Nullable Ob
return verification;
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public void createRoom(ChatRoom chatRoom, TUMCabeVerification verification, Callback<ChatRoom> cb) {
verification.setData(chatRoom);
service.createRoom(verification)
.enqueue(cb);
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public ChatMember createMember(ChatMember chatMember) throws IOException {
Expand All @@ -134,47 +126,6 @@ public ChatMember createMember(ChatMember chatMember) throws IOException {
.body();
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public void leaveChatRoom(ChatRoom chatRoom, TUMCabeVerification verification, Callback<ChatRoom> cb) {
service.leaveChatRoom(chatRoom.getId(), verification)
.enqueue(cb);
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public void addUserToChat(ChatRoom chatRoom, ChatMember member, TUMCabeVerification verification, Callback<ChatRoom> cb) {
service.addUserToChat(chatRoom.getId(), member.getId(), verification)
.enqueue(cb);
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public Observable<ChatMessage> sendMessage(int roomId, TUMCabeVerification verification) {
ChatMessage message = (ChatMessage) verification.getData();
if (message == null) {
throw new IllegalStateException("TUMCabeVerification data is not a ChatMessage");
}

if (message.isNewMessage()) {
return service.sendMessage(roomId, verification);
}

return service.updateMessage(roomId, message.getId(), verification);
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public Observable<List<ChatMessage>> getMessages(int roomId, long messageId, @Body TUMCabeVerification verification) {
return service.getMessages(roomId, messageId, verification);
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public Observable<List<ChatMessage>> getNewMessages(int roomId, @Body TUMCabeVerification verification) {
return service.getNewMessages(roomId, verification);
}

Observable<TUMCabeStatus> uploadObfuscatedIds(String lrzId, ObfuscatedIdsUpload ids) {
return service.uploadObfuscatedIds(lrzId, ids);
}
Expand Down Expand Up @@ -255,19 +206,6 @@ public List<Call<FeedbackResult>> sendFeedbackImages(Feedback feedback, String[]
return calls;
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public void searchChatMember(String query, Callback<List<ChatMember>> callback) {
service.searchMemberByName(query)
.enqueue(callback);
}

@Deprecated
/// This endpoint won't be avaliable in the v2 backend
public void getChatMemberByLrzId(String lrzId, Callback<ChatMember> callback) {
service.getMember(lrzId)
.enqueue(callback);
}

public Observable<List<Cafeteria>> getCafeterias() {
return service.getCafeterias();
Expand Down
Loading

0 comments on commit 44cb00d

Please sign in to comment.