feat: implement dark mode toggle and enhance chat UI with timestamps
This commit is contained in:
+3
-2
@@ -3,6 +3,7 @@ import {
|
||||
LoginResponse,
|
||||
RegisterResponse,
|
||||
SendMessageResponse,
|
||||
Message,
|
||||
} from "./types.js";
|
||||
|
||||
export class APIService {
|
||||
@@ -77,8 +78,8 @@ export class APIService {
|
||||
async getConversation( token: string, user1Id: string, user2Id:string ): Promise<Message[]> {
|
||||
const url = new URL( `${APIService.baseUrl}/get_conversation.php` );
|
||||
url.searchParams.set( "token", token );
|
||||
url.searchParams.set( "token", user1Id );
|
||||
url.searchParams.set( "conversation_id", user2Id );
|
||||
url.searchParams.set( "user1_id", user1Id );
|
||||
url.searchParams.set( "user2_id", user2Id );
|
||||
|
||||
const response = await fetch( url, {method: "GET"} );;
|
||||
if ( !response.ok ) {
|
||||
|
||||
Reference in New Issue
Block a user