mic_change.go 458 Bytes
Newer Older
hujiebin's avatar
hujiebin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package event_s

import (
	"git.hilo.cn/hilo-common/domain"
	"git.hilo.cn/hilo-common/rpc"
	"hilo-group/domain/event/group_ev"
	"hilo-group/myerr/bizerr"
)

// 用户进房后推送mic信息
func GroupInMicChangeEvent() {
	group_ev.AddTxGroupInEventAsync(func(model *domain.Model, event interface{}) error {
		e, ok := event.(*group_ev.TxGroupInEvent)
		if !ok {
			return bizerr.InvalidParameter
		}
		return rpc.SendSocketMicChange(e.UserId) // todo
	})
}