WEBVTT

00:00.320 --> 00:02.960
How everyone in this video.

00:03.600 --> 00:07.840
Let's continue with the remote conversations.

00:08.200 --> 00:11.360
Okay, we need to write a little bit of chat.

00:11.600 --> 00:21.640
Firstly, we need to file the conversation and in order to remove the entire place, we don't need to

00:21.640 --> 00:24.680
check this is a group or not.

00:25.280 --> 00:31.520
We will remove even if this is a group or not.

00:32.280 --> 00:36.720
Okay, so for that reason we only need to check this here.

00:37.680 --> 00:43.400
And if the conversation is a group, we need to check the owner okay.

00:43.440 --> 00:46.200
If not, let's remove everything.

00:46.640 --> 00:53.160
So let me copy this line of code and paste this to here.

00:54.720 --> 00:55.120
Okay.

00:55.160 --> 00:57.360
Firstly we find the conversation.

00:59.520 --> 01:00.560
Let me check a bit.

01:03.720 --> 01:05.280
So here we only check.

01:05.840 --> 01:10.280
If not, we will throw error.

01:12.360 --> 01:12.920
Okay.

01:13.800 --> 01:16.360
And right here we need to move the current user.

01:25.240 --> 01:34.880
If the composition is up and we need to check group owner.

01:35.440 --> 01:36.000
Okay.

01:36.920 --> 01:41.800
And if not, we will throw the error forbidden, etc..

01:43.040 --> 01:43.560
Okay.

01:44.480 --> 01:49.480
And after that we just need to call composition dot removes.

01:53.920 --> 01:56.400
Dot delete one.

01:57.480 --> 02:02.400
Let us make sure we are y okay.

02:04.120 --> 02:11.790
Go to the controllers and let me Pass in.

02:11.950 --> 02:12.390
Sorry.

02:12.790 --> 02:19.270
Pass up Charlie I over here.

02:23.230 --> 02:27.830
And removes I encourage users.

02:45.950 --> 03:00.510
Okay, now let me open the test API and I will copy this URL over here and click on the list and replace

03:00.510 --> 03:05.990
the URL and remove it here okay.

03:10.630 --> 03:11.030
Yeah.

03:11.830 --> 03:12.430
Now let me.

03:14.750 --> 03:16.670
But they let me.

03:19.150 --> 03:24.990
Relax right here with it and moved over here.

03:26.670 --> 03:33.630
And right now I will start in with not a counter up account.

03:33.670 --> 03:34.990
Okay, I will change it.

03:39.630 --> 03:44.790
And I forgot to run the application.

03:44.990 --> 03:45.390
Why?

04:05.190 --> 04:10.910
Okay, let me say and copy the access token.

04:13.430 --> 04:16.750
We also the release right here.

04:17.310 --> 04:20.990
Let me change the name Click on rename.

04:30.110 --> 04:31.230
To remove the bodies.

04:32.750 --> 04:33.590
And right here.

04:34.590 --> 04:36.630
Right set it.

04:37.710 --> 04:38.950
We got the forbidden.

04:39.190 --> 04:39.670
Okay.

04:41.630 --> 04:46.070
Let me try to do that again and say forbidden.

04:46.870 --> 04:49.070
So right now I will sign.

04:51.190 --> 04:58.510
With this account send us and copy over here.

05:00.550 --> 05:05.710
Replace and say we already got the success okay.

05:06.550 --> 05:08.830
And let's check otherwise.

05:17.150 --> 05:17.550
Okay.

05:17.550 --> 05:19.590
We are remove already removed.

05:19.630 --> 05:21.950
And let me rename the age group.

05:21.990 --> 05:23.310
It will be fun right here.

05:23.630 --> 05:24.830
I will delete that.

05:28.110 --> 05:29.950
Say okay.

05:29.990 --> 05:33.710
The message will be success and let's refresh.

05:40.030 --> 05:48.630
So it means right now we already write the logic for removes the conversation successfully.

05:49.270 --> 06:00.390
And you might think after we already removes the conversation, we should remove all messages in the

06:00.390 --> 06:02.670
conversation, right?

06:03.150 --> 06:09.230
But that's actually not true at all because the message is very important.

06:09.350 --> 06:09.830
Okay.

06:10.150 --> 06:12.550
So advertise or something like that.

06:12.750 --> 06:19.350
So for that reason in this case I think the message I will not remove the message okay.

06:19.550 --> 06:23.430
We still hold the data in the database okay.

06:23.990 --> 06:29.060
But if you want to remove all the messages in conversation.

06:29.100 --> 06:30.460
Feel free to do that.

06:30.500 --> 06:32.540
Okay, I will leave that for you.

06:34.420 --> 06:40.100
Okay, let's create the message service to rider.

06:40.420 --> 06:44.380
Close it for remove entire message.

06:44.980 --> 06:51.220
And in Java, message service into the conversation service and write the code over here.

06:51.220 --> 06:59.060
For example line write this dot message service dot delete.

06:59.220 --> 07:00.620
Okay first of all like that.

07:00.700 --> 07:09.220
And we need to move the conversation dot underscore idea over here to remove entire message.

07:09.540 --> 07:14.100
So I will not do that I will leave that job for you okay.

07:14.620 --> 07:18.580
So let me fix the error.

07:22.340 --> 07:22.820
Okay.

07:29.300 --> 07:33.580
So that's for the video I will see you in the next one.
