Now let's continue with the update method.
Well, what we need to update in the conversion session, we only allow the owner can update the name
and the avatar.
Okay.
Only two fields right here can be update right?
So for this video right here click on Update Conversion.
We will provide the group name right.
And the avatar.
Over here.
And we can put the is optional.
And right here can we?
Is also.
This for the update conversation video.
And thirdly we need to put the we need to file the conversation right.
After that we need to add objective conversation log file.
I will go new.
Log file etc..
And after that we need to add one more chat.
Only the owner can update.
Okay.
We don't allow the normal members can update.
So in We need to vote the current user.
Right in here.
Let's try to check if the current user dot underscore id different between the current conversation
from here dot zero.
.23.
Okay maybe different.
I will throw no problem.
At this.
And after that we need to update.
We can write code to update directly over here.
And.
Let me say we have a conversation.
We can update directly over here.
Equal.
Let me restructuring.
And roadmap.
But we have a little problem with this approach.
If we use something like that we always need to update to view at the same time.
Okay.
If we only update the avatar, it means the group name right here will be somehow become undefined and
this will remove this line.
I don't want that.
I want if I provide only the avatar, I want the group name.
We will go to the previous name.
Okay.
The old name is the database.
So for a result in this here, we need to add a little bit of check.
If we don't provide any group avatar I will take a look at the conversation dot avatar right here.
And right here.
So.
Okay.
And now the first approach.
And the second approach we can use the find my add and update okay.
You can use thus.
Far body and update okay.
We can put the conversation here.
And both the DTO directly does okay.
But I will not do that right now.
I will try to show you a different approach.
If we use the conversation directly over here with the fiber and the block three five.
By the end of that, we cannot add a little bit object over here.
For that reason we need to find that first and update later.
Okay.
So let's go to the controllers patch method with the current user.
Okay.
Let me show you.
And of that, only the name.
Anyway.
Let me say, okay, we already have that successfully.
And let me get that again.
Okay.
We already know that if we login with the different user for example like from us, let me show you.
Say okay we already got the formula which mean the logic right here already work as we expect it.
So I hope you understand and I will see you.