package com.ym.controller;

import com.ym.service.GroupService;
import io.rong.models.conversation.ConversationModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by weiqinxiao on 2019/2/25.
 */
@RestController
@RequestMapping("/conversation")
public class ConversationController{

    @Autowired
    GroupService groupService;

    @RequestMapping(value = "/mute", method = RequestMethod.POST)
    public Object mute(@RequestBody ConversationModel conversationModel) throws Exception {
        return groupService.conversationMute(conversationModel);
    }

    @RequestMapping(value = "/unmute", method = RequestMethod.POST)
    public Object unmute(@RequestBody ConversationModel conversationModel) throws Exception {
        return groupService.conversationUnmute(conversationModel);
    }
}
