Okay.
Hi, everyone.
The last one will be the remote.
Okay.
This is the cancel.
Friend request.
Okay.
So how we can do that?
Let's call this dot y dot.
Handle.
Cancel.
Request.
Okay.
What?
We need to move over here right now.
You can see inside the gateway we do the sender to receiver.
Now let's think a little bit.
Well first of all it will view the receiver.
Why?
The reason is very simple.
I want to send a friend request to me.
Okay.
It means the error here.
Maybe I don't know what.
It means I sorry.
The genre here will be the center and the performance will be the receiver.
Okay.
This is the action to cancel the the friend request okay.
Because this is the that will be binding this election for cancel from Zoran to Toma.
It means the zone.
Will emit the event to the Tomas for to notify the Tomas.
Okay.
It means right here the two.
Toma.
Tomas right here is about to receiver array.
Right for the status.
Right.
And let me say we need the receiver ID.
And we also need the current user, okay, because the user or the sender ID will be exactly the same.
So I think in this case I will call the sender also sender.
Request dot center dot script.
Because in the front end we want based on two information to filter it okay.
To filter is also.
Insert again why what we need to do I will call the handle.
Reject and handle cancel request fully.
We will receive our array to be a sender a string also.
And actually we need We still.
Require we need one more thing will be a friend request ID right for filter.
Right.
Uh, okay.
Friend request ID?
Please is the most important.
Okay.
Right now I will call this server.
For receiver.
And I will admit the cancel friend request with the sender ID.
And friend request.
Okay.
Based on the friend request id we will filter out us.
Okay, let me go over here.
To test that.
Right now I will remove.
And now I will send the request from John to Thomas.
Okay.
After that, I will sign in with Thomas and click on cancel friend request.
Thomas, come over here and send.
Make sure we are go with the ID of the friend.
Right.
Because this is the most important.
See.
Our user.
Not as user, is it?
Let me say why.
And we'll see.
Bye.
Oh, sorry.
Uh, we need to receive.
Are they in here?
Not not a.
Not a friend request.
Okay.
We need word receiver ID, right.
So what is the receiver?
ID will be here.
Over here.
What are we here?
Let's say a friend request.
Is it?
Let me see why.
Mm.
I think.
Only we need to write the receivers.
Let me go to the controller to see how it can be used.
Okay.
So, friend.
Request receiver.
Array.
Data file.
Here you see with abandon.
Receiver.
See over here.
Oh I know, I know the reason because in order to cancel request, we should login with the Thomas account.
Okay, so sometime I still don't know.
My bad.
I'm not sure.
We always run a cow.
Over here and click on cancel model over here and send right here.
We already got, uh.
Okay.
And if you take a look at.
The here you will say we already got the receiver ID, right.
Receiver.
And I.
Okay.
And sender IDs over here.
Okay.
And if I run the request, they will be here.
Okay.
And by auditing, we can easily filter out us on the front end.
And I hope you understand this video.
So I will see you in the next one.