Hard everyone.
In this video we will create a method for delete a message.
And if you remember, in order to delete a message, we just need to update the is.
The list right here will be true.
Okay.
Right here, let me show you.
I will copy paste this okay.
And actually I will use here.
And I just need to move the current user.
Should.
Right here we should write a logic exactly the same.
But like we need to find the message.
And we also need to check the owner of the message okay.
We only allow three.
But my message.
Right.
Now that we need to use that message is really very true.
And after that, let's save it to database.
Okay.
We don't need to return anything just like that.
And this will be a very enough.
Go back to here, remove ID.
And go back.
And let me duplicate.
I will go delete message generator to the list.
And I will delete this message over here let's say.
Validation file.
Screen is busted.
Let me say.
Also this is a batch of chocolate pie.
My bad.
Okay.
And let's wait a little bit and send again.
Okay.
Message will be success.
And over here, if you say who is the message.
Right.
Now we should change a little bit after we already remove in the file one method we only allow, we
can find.
Oh, actually, this is a Phi Phi one.
All right.
I will use the array.
Underscore array.
I'm sorry.
We need to change the message.
Right here.
We need to change Phi one.
And we will find by underscore ID.
And please delete only Joe okay.
Oh sorry.
On on whiteboard we only find the message with the is the list with before and inside the file.
All right.
Here we are.
We don't need the file.
Let me remove it again.
All message.
We don't need to filter okay.
We don't need to vote.
For example is delete will be found in here.
The reason we call it later will be based on it.
get on it to do the similar with the five books.
Okay, we still return.
That is delete.
Okay, let me show you what I mean it later.
To get you can say if I get, I have is delete over here and delete over here.
Okay.
By on the information I can use I can.
Create a revoke okay.
For example like message revoke okay.
Message or.
Revoke or something like that okay.
For that reason we don't need to.
Filter in.
The get method.
But in the get one method is totally different okay.
In the get method we should filter that.
So that's for the Java removes.
And I hope you understand this video.
I will see you in.