团购:基础接口
This commit is contained in:
@@ -56,6 +56,11 @@ export async function addRoleToWorldAuctionChannel(roleId: string, sid: string,
|
||||
await addRoleToChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function addRoleToGroupShopChannel(roleId: string, sid: string) {
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.GROUP_SHOP);
|
||||
await addRoleToChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
async function leaveChannel(roomId: string, roleId: string, sid: string) {
|
||||
const channelSid = await channelServer(roomId);
|
||||
await pinus.app.rpc.chat.chatRemote.leaveChannel.toServer(channelSid, roomId, roleId, sid);
|
||||
@@ -86,6 +91,11 @@ export async function leaveWorldAuctionChannel(roleId: string, sid: string, serv
|
||||
await leaveChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function leaveGroupShopChannel(roleId: string, sid: string) {
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.GROUP_SHOP);
|
||||
await leaveChannel(roomId, roleId, sid);
|
||||
}
|
||||
|
||||
export async function leaveGuildChannel(roleId: string, sid: string, guildCode: string) {
|
||||
if (!guildCode) return;
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.GUILD, guildCode);
|
||||
@@ -122,6 +132,12 @@ export async function getWorldAuctionChannelSid(serverId: number) {
|
||||
return channelSid;
|
||||
}
|
||||
|
||||
export async function getGroupShopSid() {
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.GROUP_SHOP);
|
||||
const channelSid = await channelServer(roomId);
|
||||
return channelSid;
|
||||
}
|
||||
|
||||
async function delChannel(roomId: string) {
|
||||
const channelSid = await channelServer(roomId);
|
||||
await pinus.app.rpc.chat.chatRemote.deleteChannel.toServer(channelSid, roomId);
|
||||
|
||||
Reference in New Issue
Block a user