Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e6e23da13 | ||
|
|
88652af565 | ||
|
|
af58bf91a4 | ||
|
|
9d86539d01 | ||
|
|
2559fa7e48 |
@@ -11,10 +11,13 @@
|
|||||||
你认为正确的表现应该是什么样的。
|
你认为正确的表现应该是什么样的。
|
||||||
|
|
||||||
#### 补充条件
|
#### 补充条件
|
||||||
是否是毕现的,还是偶现的?是否只有在特殊的网络/设备/平台上出现,还是所有的都出现。还有您用的版本是什么时候的,是不是最新版
|
是否是必现的,还是偶现的?是否只有在特殊的网络/设备/平台上出现,还是所有的都出现。还有您用的版本是什么时候的,是不是最新版
|
||||||
|
|
||||||
#### demo对比结果
|
#### demo对比结果
|
||||||
请用demo对比测试,demo上是什么状态。
|
请用demo对比测试,demo上是什么状态。
|
||||||
|
|
||||||
#### 检索已有问题
|
#### 检索已有问题
|
||||||
除了可以检索已有issue外,还可以去野火论坛查找已有问题,论坛地址为 https://bbs.wildfirechat.cn
|
除了可以检索已有issue外,还可以去野火论坛查找已有问题,论坛地址为 https://bbs.wildfirechat.cn
|
||||||
|
|
||||||
|
#### star 我们
|
||||||
|
给我们点个star,可以及时接收到我们回复信息,另外也是对我们支持人员辛苦工作的认可,激励我们更好更快地为大家服务。
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.95</version>
|
<version>0.96</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>moquette-broker</artifactId>
|
<artifactId>moquette-broker</artifactId>
|
||||||
|
|||||||
@@ -539,8 +539,17 @@ public class MemoryMessagesStore implements IMessagesStore {
|
|||||||
int pullType = ProtoConstants.PullType.Pull_Normal;
|
int pullType = ProtoConstants.PullType.Pull_Normal;
|
||||||
|
|
||||||
if (type == ProtoConstants.ConversationType.ConversationType_Private) {
|
if (type == ProtoConstants.ConversationType.ConversationType_Private) {
|
||||||
notifyReceivers.add(fromUser);
|
if(message.getToCount() > 0) {
|
||||||
notifyReceivers.add(message.getConversation().getTarget());
|
if(message.getToList().contains(fromUser)) {
|
||||||
|
notifyReceivers.add(fromUser);
|
||||||
|
}
|
||||||
|
if(message.getToList().contains(message.getConversation().getTarget())) {
|
||||||
|
notifyReceivers.add(message.getConversation().getTarget());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
notifyReceivers.add(fromUser);
|
||||||
|
notifyReceivers.add(message.getConversation().getTarget());
|
||||||
|
}
|
||||||
pullType = ProtoConstants.PullType.Pull_Normal;
|
pullType = ProtoConstants.PullType.Pull_Normal;
|
||||||
} else if (type == ProtoConstants.ConversationType.ConversationType_Group) {
|
} else if (type == ProtoConstants.ConversationType.ConversationType_Group) {
|
||||||
notifyReceivers.add(fromUser);
|
notifyReceivers.add(fromUser);
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.95</version>
|
<version>0.96</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ public interface APIPath {
|
|||||||
String Conference_List_Participant = "/admin/conference/list_participant";
|
String Conference_List_Participant = "/admin/conference/list_participant";
|
||||||
String Conference_Create = "/admin/conference/create";
|
String Conference_Create = "/admin/conference/create";
|
||||||
String Conference_Destroy = "/admin/conference/destroy";
|
String Conference_Destroy = "/admin/conference/destroy";
|
||||||
|
String Conference_Recording = "/admin/conference/recording";
|
||||||
|
|
||||||
String Channel_User_Info = "/channel/user_info";
|
String Channel_User_Info = "/channel/user_info";
|
||||||
String Channel_Update_Profile = "/channel/update_profile";
|
String Channel_Update_Profile = "/channel/update_profile";
|
||||||
|
|||||||
-88
@@ -1,88 +0,0 @@
|
|||||||
package cn.wildfirechat.messagecontentbuilder;
|
|
||||||
|
|
||||||
import cn.wildfirechat.pojos.MessagePayload;
|
|
||||||
import cn.wildfirechat.proto.ProtoConstants;
|
|
||||||
import io.netty.util.internal.StringUtil;
|
|
||||||
import org.json.simple.JSONArray;
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
public class ArticlesContentBuilder extends MessageContentBuilder{
|
|
||||||
public static class Article {
|
|
||||||
public String id;
|
|
||||||
public String cover;
|
|
||||||
public String title;
|
|
||||||
public String digest;
|
|
||||||
public String url;
|
|
||||||
public boolean readReport;
|
|
||||||
}
|
|
||||||
public Article topArticle;
|
|
||||||
public List<Article> subArticles;
|
|
||||||
|
|
||||||
public static ArticlesContentBuilder newBuilder(String id, String cover, String title, String digest, String url, boolean readReport) {
|
|
||||||
ArticlesContentBuilder builder = new ArticlesContentBuilder();
|
|
||||||
builder.topArticle = new Article();
|
|
||||||
builder.topArticle.id = id;
|
|
||||||
builder.topArticle.cover = cover;
|
|
||||||
builder.topArticle.title = title;
|
|
||||||
builder.topArticle.digest = digest;
|
|
||||||
builder.topArticle.url = url;
|
|
||||||
builder.topArticle.readReport = readReport;
|
|
||||||
return builder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArticlesContentBuilder addSubArticle(String id, String cover, String title, String digest, String url, boolean readReport) {
|
|
||||||
Article article = new Article();
|
|
||||||
article.id = id;
|
|
||||||
article.cover = cover;
|
|
||||||
article.title = title;
|
|
||||||
article.digest = digest;
|
|
||||||
article.url = url;
|
|
||||||
article.readReport = readReport;
|
|
||||||
if(subArticles == null) {
|
|
||||||
subArticles = new ArrayList<>();
|
|
||||||
}
|
|
||||||
subArticles.add(article);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static JSONObject toJSON(Article article) {
|
|
||||||
JSONObject top = new JSONObject();
|
|
||||||
if(!StringUtil.isNullOrEmpty(article.id))
|
|
||||||
top.put("id", article.id);
|
|
||||||
if(!StringUtil.isNullOrEmpty(article.cover))
|
|
||||||
top.put("cover", article.cover);
|
|
||||||
if(!StringUtil.isNullOrEmpty(article.title))
|
|
||||||
top.put("title", article.title);
|
|
||||||
if(!StringUtil.isNullOrEmpty(article.digest))
|
|
||||||
top.put("digest", article.digest);
|
|
||||||
if(!StringUtil.isNullOrEmpty(article.url))
|
|
||||||
top.put("url", article.url);
|
|
||||||
if(article.readReport)
|
|
||||||
top.put("rr", article.readReport);
|
|
||||||
return top;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MessagePayload build() {
|
|
||||||
MessagePayload payload = encodeBase();
|
|
||||||
payload.setType(ProtoConstants.ContentType.Articles);
|
|
||||||
payload.setPersistFlag(ProtoConstants.PersistFlag.Persist_And_Count);
|
|
||||||
payload.setSearchableContent(topArticle.title);
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
jsonObject.put("top", toJSON(topArticle));
|
|
||||||
if(subArticles != null && !subArticles.isEmpty()) {
|
|
||||||
JSONArray jsonArray = new JSONArray();
|
|
||||||
subArticles.forEach(article -> jsonArray.add(toJSON(article)));
|
|
||||||
jsonObject.put("subArticles", jsonArray);
|
|
||||||
}
|
|
||||||
|
|
||||||
payload.setBase64edData(Base64.getEncoder().encodeToString(jsonObject.toJSONString().getBytes(StandardCharsets.UTF_8)));
|
|
||||||
return payload;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,16 +13,18 @@ public class ArticleContent {
|
|||||||
public String id;
|
public String id;
|
||||||
public String cover;
|
public String cover;
|
||||||
public String title;
|
public String title;
|
||||||
|
public String digest;
|
||||||
public String url;
|
public String url;
|
||||||
public boolean rr;
|
public boolean rr;
|
||||||
|
|
||||||
public Article() {
|
public Article() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Article(String id, String cover, String title, String url, boolean rr) {
|
public Article(String id, String cover, String title, String digest, String url, boolean rr) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.cover = cover;
|
this.cover = cover;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
|
this.digest = digest;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.rr = rr;
|
this.rr = rr;
|
||||||
}
|
}
|
||||||
@@ -33,14 +35,14 @@ public class ArticleContent {
|
|||||||
public ArticleContent() {
|
public ArticleContent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArticleContent(String id, String cover, String title, String url, boolean rr) {
|
public ArticleContent(String id, String cover, String title, String digest, String url, boolean rr) {
|
||||||
this.top = new Article(id, cover, title, url, rr);
|
this.top = new Article(id, cover, title, digest, url, rr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArticleContent addSubArticle(String id, String cover, String title, String url, boolean rr) {
|
public ArticleContent addSubArticle(String id, String cover, String title, String digest, String url, boolean rr) {
|
||||||
if (subArticles == null)
|
if (subArticles == null)
|
||||||
subArticles = new ArrayList<>();
|
subArticles = new ArrayList<>();
|
||||||
subArticles.add(new Article(id, cover, title, url, rr));
|
subArticles.add(new Article(id, cover, title, digest, url, rr));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package cn.wildfirechat.pojos;
|
||||||
|
|
||||||
|
public class PojoConferenceRecording {
|
||||||
|
public String roomId;
|
||||||
|
public boolean recording;
|
||||||
|
public boolean advance;
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<!--<relativePath>../pom.xml</relativePath>-->
|
<!--<relativePath>../pom.xml</relativePath>-->
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.95</version>
|
<version>0.96</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>distribution</artifactId>
|
<artifactId>distribution</artifactId>
|
||||||
|
|||||||
@@ -11,6 +11,12 @@
|
|||||||
|
|
||||||
# 更新记录
|
# 更新记录
|
||||||
|
|
||||||
|
--------------
|
||||||
|
Release note 0.96:
|
||||||
|
1. 文章消息添加摘要字段
|
||||||
|
2. 单聊消息支持server api只发送给其中一方
|
||||||
|
3. Server api添加会议录制/停止录制接口
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
Release note 0.95:
|
Release note 0.95:
|
||||||
1. 添加按照用户删除会话接口
|
1. 添加按照用户删除会话接口
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>0.95</version>
|
<version>0.96</version>
|
||||||
<name>Wildfire Chat</name>
|
<name>Wildfire Chat</name>
|
||||||
<description>Wildfire Chat Server</description>
|
<description>Wildfire Chat Server</description>
|
||||||
<inceptionYear>2019</inceptionYear>
|
<inceptionYear>2019</inceptionYear>
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>wildfirechat-parent</artifactId>
|
<artifactId>wildfirechat-parent</artifactId>
|
||||||
<groupId>cn.wildfirechat</groupId>
|
<groupId>cn.wildfirechat</groupId>
|
||||||
<version>0.95</version>
|
<version>0.96</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,15 @@ public class ConferenceAdmin {
|
|||||||
return AdminHttpUtils.httpJsonPost(path, create, Void.class);
|
return AdminHttpUtils.httpJsonPost(path, create, Void.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IMResult<Void> enableRecording(String roomId, boolean advance, boolean recording) throws Exception {
|
||||||
|
String path = APIPath.Conference_Recording;
|
||||||
|
PojoConferenceRecording create = new PojoConferenceRecording();
|
||||||
|
create.roomId = roomId;
|
||||||
|
create.recording = recording;
|
||||||
|
create.advance = advance;
|
||||||
|
return AdminHttpUtils.httpJsonPost(path, create, Void.class);
|
||||||
|
}
|
||||||
|
|
||||||
public static IMResult<Void> destroy(String roomId, boolean advance) throws Exception {
|
public static IMResult<Void> destroy(String roomId, boolean advance) throws Exception {
|
||||||
String path = APIPath.Conference_Destroy;
|
String path = APIPath.Conference_Destroy;
|
||||||
PojoConferenceRoomId conferenceRoomId = new PojoConferenceRoomId(roomId, advance);
|
PojoConferenceRoomId conferenceRoomId = new PojoConferenceRoomId(roomId, advance);
|
||||||
|
|||||||
@@ -1454,9 +1454,9 @@ public class Main {
|
|||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArticleContent articleContent = new ArticleContent("article1", "https://media.wfcoss.cn/channel-assets/20220816/2dd76540daa9444dae44e942aa1c2bbc.png", "这是一个测试文章", "https://mp.weixin.qq.com/s/W6tanLbALd3qqZM8r3MTgA", true);
|
ArticleContent articleContent = new ArticleContent("article1", "https://media.wfcoss.cn/channel-assets/20220816/2dd76540daa9444dae44e942aa1c2bbc.png", "这是一个测试文章", "测试一下文章的功能", "https://mp.weixin.qq.com/s/W6tanLbALd3qqZM8r3MTgA", true);
|
||||||
articleContent.addSubArticle("article2", "https://media.wfcoss.cn/channel-assets/20220816/2dd76540daa9444dae44e942aa1c2bbc.png", "这是第二个测试文章", "https://mp.weixin.qq.com/s/W6tanLbALd3qqZM8r3MTgA", false);
|
articleContent.addSubArticle("article2", "https://media.wfcoss.cn/channel-assets/20220816/2dd76540daa9444dae44e942aa1c2bbc.png", "这是第二个测试文章", "测试一下文章的功能", "https://mp.weixin.qq.com/s/W6tanLbALd3qqZM8r3MTgA", false);
|
||||||
articleContent.addSubArticle("article3", "https://media.wfcoss.cn/channel-assets/20220816/2dd76540daa9444dae44e942aa1c2bbc.png", "这是第三个测试文章", "https://mp.weixin.qq.com/s/W6tanLbALd3qqZM8r3MTgA", false);
|
articleContent.addSubArticle("article3", "https://media.wfcoss.cn/channel-assets/20220816/2dd76540daa9444dae44e942aa1c2bbc.png", "这是第三个测试文章", "测试一下文章的功能", "https://mp.weixin.qq.com/s/W6tanLbALd3qqZM8r3MTgA", false);
|
||||||
payload = articleContent.toPayload();
|
payload = articleContent.toPayload();
|
||||||
|
|
||||||
resultSendMessage = channelServiceApi.sendMessage(0, null, payload);
|
resultSendMessage = channelServiceApi.sendMessage(0, null, payload);
|
||||||
@@ -1642,22 +1642,30 @@ public class Main {
|
|||||||
System.out.println("conference list " + listResult.getResult().conferenceInfoList);
|
System.out.println("conference list " + listResult.getResult().conferenceInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
IMResult<Void> createResult = ConferenceAdmin.createRoom("helloroomid", "hello room description", "123456", 9, false, 0, false, true);
|
IMResult<Void> voidIMResult = ConferenceAdmin.createRoom("helloroomid", "hello room description", "123456", 9, false, 0, false, true);
|
||||||
if(createResult == null || createResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
if(voidIMResult == null || voidIMResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||||
System.out.println("create conference failure");
|
System.out.println("create conference failure");
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("create conference");
|
System.out.println("create conference");
|
||||||
}
|
}
|
||||||
|
|
||||||
createResult = ConferenceAdmin.createRoom("helloroomid2", "hello room description advanced", "123456", 20, true, 0, false, true);
|
voidIMResult = ConferenceAdmin.createRoom("helloroomid2", "hello room description advanced", "123456", 20, true, 0, false, true);
|
||||||
if(createResult == null || createResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
if(voidIMResult == null || voidIMResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||||
System.out.println("create conference failure");
|
System.out.println("create conference failure");
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("create conference");
|
System.out.println("create conference");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
voidIMResult = ConferenceAdmin.enableRecording("helloroomid2", true, true);
|
||||||
|
if(voidIMResult == null || voidIMResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||||
|
System.out.println("recording conference failure");
|
||||||
|
System.exit(-1);
|
||||||
|
} else {
|
||||||
|
System.out.println("recording conference success");
|
||||||
|
}
|
||||||
|
|
||||||
listResult = ConferenceAdmin.listConferences();
|
listResult = ConferenceAdmin.listConferences();
|
||||||
if(listResult == null || listResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
if(listResult == null || listResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||||
System.out.println("get conference list failure");
|
System.out.println("get conference list failure");
|
||||||
|
|||||||
Reference in New Issue
Block a user