示例#1
0
func newPresenceResponse(isAvailable bool, presence pb.PresenceResponse_SHOW, valid bool) *pb.PresenceResponse {
	return &pb.PresenceResponse{
		IsAvailable: proto.Bool(isAvailable),
		Presence:    presence.Enum(),
		Valid:       proto.Bool(valid),
	}
}
示例#2
0
func setPresenceResponse(m *pb.PresenceResponse, isAvailable bool, presence pb.PresenceResponse_SHOW, valid bool) {
	m.IsAvailable = &isAvailable
	m.Presence = presence.Enum()
	m.Valid = &valid
}