Hello. I wanted to get the participant properties. I tried to get the participant ID (not the RemoteJid but the SenderJid) and I got an error but I found out how to get the participant ID, but now I wanted to get the participant's properties, like, I want to know whether a participant is an admin or not.
Could somebody please help me?
Thank you in advance.
@tguimmaraess send me an email : [email protected]
What do you mean participants in group? Check group.go, there is GetMetadata function.
What do you mean participants in group? Check group.go, there is GetMetadata function.
@ramacatur I mean how can I identify whether a participant is an admin, or a regular member? Thank you for your reply.
I have tried contacts.go and store.go. but I can't find anything related to this. I noticed the the file token.go has these properties but I don't know how to get them.
I'm using these to get the participant ID but I would like to know how I get its "properties"
message.Info.Source.GetParticipant()
message.ContextInfo.Participant
This is from incoming message group?
This is from incoming message group?
Yes. I just need to know what participant is an admin. I don't know how I do it.
Is there any way like message.Info.Source.GetParticipant().IsAdmin() or something or proto.GetParticipant.GetKey().Type
What do you mean participants in group? Check group.go, there is GetMetadata function.
@ramacatur I mean how can I identify whether a participant is an admin, or a regular member? Thank you for your reply.
I have tried contacts.go and store.go. but I can't find anything related to this. I noticed the the file token.go has these properties but I don't know how to get them.I'm using these to get the participant ID but I would like to know how I get its "properties"
message.Info.Source.GetParticipant() message.ContextInfo.Participant
May be try use function GetGroupMetaData in group.go and you will get json data participants. In data participants, you will found IsAdmin and IsSuperAdmin in bool type.
What do you mean participants in group? Check group.go, there is GetMetadata function.
@ramacatur I mean how can I identify whether a participant is an admin, or a regular member? Thank you for your reply.
I have tried contacts.go and store.go. but I can't find anything related to this. I noticed the the file token.go has these properties but I don't know how to get them.
I'm using these to get the participant ID but I would like to know how I get its "properties"message.Info.Source.GetParticipant() message.ContextInfo.ParticipantMay be try use function
GetGroupMetaDatain group.go and you will get json data participants. In data participants, you will found IsAdmin and IsSuperAdmin in bool type.
Oh thank you very much. That's what I needed to know! Thank you.

i try do this but ended getting this..

i try do this but ended getting this..
It is output pointer. You can use fmt.Println(*gmeta)
i try do this but ended getting this..
It's a chan so use <-gmta
Most helpful comment
May be try use function
GetGroupMetaDatain group.go and you will get json data participants. In data participants, you will found IsAdmin and IsSuperAdmin in bool type.