WEBVTT

00:00.360 --> 00:01.760
Hard everyone.

00:01.760 --> 00:09.840
In this video we will create a method for delete a message.

00:10.200 --> 00:16.160
And if you remember, in order to delete a message, we just need to update the is.

00:16.160 --> 00:17.960
The list right here will be true.

00:18.240 --> 00:18.720
Okay.

00:22.480 --> 00:23.840
Right here, let me show you.

00:28.160 --> 00:31.560
I will copy paste this okay.

00:33.320 --> 00:37.040
And actually I will use here.

00:37.760 --> 00:40.080
And I just need to move the current user.

00:47.840 --> 00:48.400
Should.

00:52.200 --> 00:56.000
Right here we should write a logic exactly the same.

00:56.400 --> 00:58.200
But like we need to find the message.

01:05.160 --> 01:09.040
And we also need to check the owner of the message okay.

01:09.440 --> 01:11.280
We only allow three.

01:11.280 --> 01:12.320
But my message.

01:12.360 --> 01:12.840
Right.

01:14.960 --> 01:20.560
Now that we need to use that message is really very true.

01:21.120 --> 01:24.120
And after that, let's save it to database.

01:24.840 --> 01:25.360
Okay.

01:25.800 --> 01:30.320
We don't need to return anything just like that.

01:31.680 --> 01:34.160
And this will be a very enough.

01:34.760 --> 01:37.200
Go back to here, remove ID.

02:17.040 --> 02:18.200
And go back.

02:21.840 --> 02:23.600
And let me duplicate.

02:26.640 --> 02:32.120
I will go delete message generator to the list.

02:35.640 --> 02:38.600
And I will delete this message over here let's say.

02:40.360 --> 02:41.760
Validation file.

02:48.800 --> 02:50.320
Screen is busted.

02:52.120 --> 02:52.800
Let me say.

02:56.160 --> 02:59.280
Also this is a batch of chocolate pie.

02:59.600 --> 03:00.240
My bad.

03:01.120 --> 03:01.600
Okay.

03:04.160 --> 03:08.000
And let's wait a little bit and send again.

03:09.200 --> 03:09.600
Okay.

03:09.680 --> 03:11.040
Message will be success.

03:11.640 --> 03:15.920
And over here, if you say who is the message.

03:15.920 --> 03:16.400
Right.

03:20.360 --> 03:27.240
Now we should change a little bit after we already remove in the file one method we only allow, we

03:27.240 --> 03:29.190
can find.

03:29.230 --> 03:33.670
Oh, actually, this is a Phi Phi one.

03:33.710 --> 03:34.070
All right.

03:34.110 --> 03:35.670
I will use the array.

03:37.830 --> 03:40.550
Underscore array.

03:48.390 --> 03:49.030
I'm sorry.

03:52.510 --> 03:53.990
We need to change the message.

03:56.190 --> 03:56.830
Right here.

03:57.070 --> 03:59.230
We need to change Phi one.

03:59.950 --> 04:02.510
And we will find by underscore ID.

04:04.790 --> 04:09.110
And please delete only Joe okay.

04:09.550 --> 04:10.190
Oh sorry.

04:10.230 --> 04:18.990
On on whiteboard we only find the message with the is the list with before and inside the file.

04:19.030 --> 04:19.390
All right.

04:19.390 --> 04:20.030
Here we are.

04:20.070 --> 04:21.230
We don't need the file.

04:21.230 --> 04:24.630
Let me remove it again.

04:24.630 --> 04:25.190
All message.

04:25.190 --> 04:29.150
We don't need to filter okay.

04:29.150 --> 04:30.190
We don't need to vote.

04:30.190 --> 04:33.830
For example is delete will be found in here.

04:34.190 --> 04:36.830
The reason we call it later will be based on it.

04:36.950 --> 04:40.590
get on it to do the similar with the five books.

04:40.630 --> 04:44.270
Okay, we still return.

04:44.550 --> 04:45.750
That is delete.

04:47.270 --> 04:52.150
Okay, let me show you what I mean it later.

04:53.150 --> 05:00.710
To get you can say if I get, I have is delete over here and delete over here.

05:00.910 --> 05:01.310
Okay.

05:01.350 --> 05:04.910
By on the information I can use I can.

05:06.150 --> 05:08.230
Create a revoke okay.

05:08.270 --> 05:15.030
For example like message revoke okay.

05:15.070 --> 05:16.870
Message or.

05:20.830 --> 05:23.150
Revoke or something like that okay.

05:23.590 --> 05:25.190
For that reason we don't need to.

05:27.670 --> 05:28.910
Filter in.

05:28.950 --> 05:30.150
The get method.

05:31.990 --> 05:35.950
But in the get one method is totally different okay.

05:35.990 --> 05:38.990
In the get method we should filter that.

05:39.950 --> 05:42.630
So that's for the Java removes.

05:42.990 --> 05:45.350
And I hope you understand this video.

05:45.910 --> 05:46.870
I will see you in.
