import { request } from "./request";
const prveUrl = "chat/";

/**
 * 群消息
 * @param {Object} data 
 * @returns 
 */
export const groupInfo = (data) => {
  return request(prveUrl + "group/info", "POST", data, true);
};

export const commonPhrase = (data) => {
  return request(prveUrl + "common-phrase/index", "POST", data, true);
};
export const commonPhraseAdd = (data) => {
  return request(prveUrl + "common-phrase/add", "POST", data, true);
};


export const commonPhraseDel = (data) => {
  return request(prveUrl + "common-phrase/del", "POST", data, true);
};


export const groupCreate = (data) => {
  return request(prveUrl + "group/create", "POST", data, true);
};

export const groupJoin = (data) => {
  return request(prveUrl + "group/join", "POST", data, true);
};
export const groupGetGroupUrl = (data) => {
  return request(prveUrl + "group/getgrepurl", "POST", data, true);
};

export const groupQuit = (data) => {
  return request(prveUrl + "group/quit", "POST", data, true);
};

export const groupTarsGroup = (data) => {
  return request(prveUrl + "group/tarsgroup", "POST", data, true);
};

export const groupAnnouncement = (data) => {
  return request(prveUrl + "group/announcement", "POST", data, true);
};
export const groupMute = (data) => {
  return request(prveUrl + "group/mute", "POST", data, true);
};

export const groupMunute = (data) => {
  return request(prveUrl + "group/unmute", "POST", data, true);
};

export const groupKick = (data) => {
  return request(prveUrl + "group/kick", "POST", data, true);
};

export const groupMembers = (data) => {
  return request(prveUrl + "group/members", "POST", data, true);
};


export const messageHistory = (data) => {
  return request(prveUrl + "message/history", "POST", data, true);
};

export const messageMarkRead = (data) => {
  return request(prveUrl + "message/mark-read", "POST", data, true);
};

export const messageMarkReadAll = (data) => {
  return request(prveUrl + "message/mark-read-all", "POST", data, true);
};

export const messageUnreadCount = (data) => {
  return request(prveUrl + "message/unread-count", "POST", data, true);
};

export const messageSessionList = (data) => {
  return request(prveUrl + "message/sessionlist", "POST", data, true);
};

export const groupDoNotDisturb = (data) => {
  return request(prveUrl + "group/do-not-disturb", "POST", data, true);
};

export const groupEditTitle = (data) => {
  return request(prveUrl + "group/editTitle", "POST", data, true);
};

