Ai
2 Star 9 Fork 5

融云 RongCloud/server-sdk-java

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DemotionExample.java 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
huhangtao 提交于 2025-03-14 09:57 +08:00 . FEAT(m-5337441553):translation
package io.rong.example.chatroom;
import io.rong.CenterEnum;
import io.rong.RongCloud;
import io.rong.methods.chatroom.demotion.Demotion;
import io.rong.models.response.ChatroomDemotionMsgResult;
import io.rong.models.response.ResponseResult;
public class DemotionExample {
/**
* Replace with your appKey
*/
private static final String appKey = "appKey";
/**
* Replace with your appSecret
*/
private static final String appSecret = "appSecret";
public static void main(String[] args) throws Exception {
RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret, CenterEnum.BJ);
Demotion demotion = rongCloud.chatroom.demotion;
/**
*
* Add in-app chatroom message demotion
*/
String[] messageType = {"RC:VcMsg", "RC:ImgTextMsg", "RC:ImgMsg"};
ResponseResult addResult = demotion.add(messageType);
System.out.println("add demotion: " + addResult.toString());
/**
*
* Remove in-app chatroom message demotion
*/
ResponseResult removeResult = demotion.remove(messageType);
System.out.println("remove demotion: " + removeResult.toString());
/**
* Retrieves the list of demotion messages and prints the result.
*/
ChatroomDemotionMsgResult demotionMsgResult = demotion.getList();
System.out.println("get demotion: " + demotionMsgResult.toString());
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/rongcloud/server-sdk-java.git
git@gitee.com:rongcloud/server-sdk-java.git
rongcloud
server-sdk-java
server-sdk-java
master

搜索帮助