Skip to content

Commit

Permalink
feat: 定义机器人消息类型
Browse files Browse the repository at this point in the history
Signed-off-by: Ke Jie <[email protected]>
  • Loading branch information
chzealot committed Sep 21, 2023
1 parent 08b03f5 commit 1529dd0
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app-stream-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>open-app-stream-client</artifactId>
<groupId>com.dingtalk.open</groupId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.dingtalk.open.app.api.models.bot;

import java.util.List;

public class ChatbotMessage {
String conversationId;
List<MentionUser> atUsers;
String chatbotCorpId;
String chatbotUserId;
String msgId;
String senderNick;
Boolean isAdmin;
String senderStaffId;
Long sessionWebhookExpiredTime;
Long createAt;
String senderCorpId;
String conversationType;
String senderId;
String conversationTitle;
Boolean isInAtList;
String sessionWebhook;
String msgtype;
MessageContent text;
MessageContent content;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.dingtalk.open.app.api.models.bot;

public class MentionUser {
String dingtalkId;
String staffId;

public String getDingtalkId() {
return dingtalkId;
}

public void setDingtalkId(String dingtalkId) {
this.dingtalkId = dingtalkId;
}

public String getStaffId() {
return staffId;
}

public void setStaffId(String staffId) {
this.staffId = staffId;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.dingtalk.open.app.api.models.bot;

import java.util.List;

public class MessageContent {
/**
* 适用的类型:text
*/
String content;
/**
* 适用的类型:picture, richText[index]
*/
String pictureDownloadCode;
/**
* 适用的类型:picture, video, audio, file, richText[index]
*/
String downloadCode;
/**
* 适用的类型:video
*/
String duration;
/**
* 适用的类型:video
*/
String videoType;
/**
* 适用的类型:audio
*/
String recognition;
/**
* 适用的类型:file
*/
String spaceId;
/**
* 适用的类型:file
*/
String fileName;
/**
* 适用的类型:file
*/
String fileId;
/**
* 适用的类型:richText
*/
List<MessageContent> richText;
/**
* 适用的类型:richText[index]
*/
String text;
/**
* 适用的类型:richText[index]
*/
String type;
/**
* 适用的类型:unknownMsgType
*/
String unknownMsgType;
}
4 changes: 2 additions & 2 deletions app-stream-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>open-app-stream-client</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>app-stream-client</artifactId>
<packaging>jar</packaging>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<name>app-stream-client</name>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions app-stream-network/app-stream-network-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>app-stream-network</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>app-stream-network-api</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<packaging>jar</packaging>

<name>app-stream-network-api</name>
Expand Down
2 changes: 1 addition & 1 deletion app-stream-network/app-stream-network-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>app-stream-network</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion app-stream-network/app-stream-network-rsocket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>app-stream-network</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions app-stream-network/app-stream-network-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>app-stream-network</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.dingtalk.open</groupId>
<artifactId>app-stream-network-api</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
Expand Down
2 changes: 1 addition & 1 deletion app-stream-network/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>open-app-stream-client</artifactId>
<groupId>com.dingtalk.open</groupId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion app-stream-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>open-app-stream-client</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
</parent>

<artifactId>app-stream-protocol</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions dingtalk-stream/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<groupId>com.dingtalk.open</groupId>
<artifactId>open-app-stream-client</artifactId>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dingtalk-stream</artifactId>
<packaging>jar</packaging>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<name>app-stream-client</name>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.dingtalk.open</groupId>
<artifactId>open-app-stream-client</artifactId>
<packaging>pom</packaging>
<version>1.0.8</version>
<version>1.0.9-SNAPSHOT</version>
<modules>
<module>app-stream-client</module>
<module>app-stream-api</module>
Expand Down
2 changes: 1 addition & 1 deletion version.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

mvn versions:set -DnewVersion=1.0.8
mvn versions:set -DnewVersion=1.0.9-SNAPSHOT

0 comments on commit 1529dd0

Please sign in to comment.