package model

type Action struct {
	Action string                 `json:"action"`
	Params map[string]interface{} `json:"params"`
}

func GenDrawbackPkg(msgId int32) Action {
	return Action{
		Action: "delete_msg",
		Params: map[string]interface{}{
			"message_id": msgId,
		},
	}
}

// 戳一戳GenPokePkg
func GenPokePkg(groupId int64, userId int64) Action {
	if groupId != 0 {
		return Action{
			Action: "send_poke",
			Params: map[string]interface{}{
				"group_id": groupId,
				"user_id":  userId,
			},
		}
	}
	return Action{
		Action: "send_poke",
		Params: map[string]interface{}{
			"user_id": userId,
		},
	}
}

// 获取群成员列表 GenGetGroupMemberListPkg
func GenGetGroupMemberListPkg(groupId int64) Action {
	return Action{
		Action: "get_group_member_list",
		Params: map[string]interface{}{
			"group_id": groupId,
		},
	}
}
