Ensure `ChatIds` are handled by token permission requests
This commit is contained in:
parent
83ed3e5ede
commit
3f231f53e3
|
@ -22,6 +22,7 @@ type CreateCommunityTokenPermission struct {
|
||||||
Type protobuf.CommunityTokenPermission_Type `json:"type"`
|
Type protobuf.CommunityTokenPermission_Type `json:"type"`
|
||||||
TokenCriteria []*protobuf.TokenCriteria `json:"tokenCriteria"`
|
TokenCriteria []*protobuf.TokenCriteria `json:"tokenCriteria"`
|
||||||
IsPrivate bool `json:"isPrivate"`
|
IsPrivate bool `json:"isPrivate"`
|
||||||
|
ChatIds []string `json:"chat_ids"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *CreateCommunityTokenPermission) Validate() error {
|
func (p *CreateCommunityTokenPermission) Validate() error {
|
||||||
|
@ -56,5 +57,6 @@ func (p *CreateCommunityTokenPermission) ToCommunityTokenPermission() protobuf.C
|
||||||
Type: p.Type,
|
Type: p.Type,
|
||||||
TokenCriteria: p.TokenCriteria,
|
TokenCriteria: p.TokenCriteria,
|
||||||
IsPrivate: p.IsPrivate,
|
IsPrivate: p.IsPrivate,
|
||||||
|
ChatIds: p.ChatIds,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,5 +28,6 @@ func (u *EditCommunityTokenPermission) ToCommunityTokenPermission() protobuf.Com
|
||||||
Id: u.PermissionID,
|
Id: u.PermissionID,
|
||||||
Type: u.Type,
|
Type: u.Type,
|
||||||
TokenCriteria: u.TokenCriteria,
|
TokenCriteria: u.TokenCriteria,
|
||||||
|
ChatIds: u.ChatIds,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue