Skip to content

Commit 8bb4d76

Browse files
committed
更正: 文档接口及旧插件示例
Signed-off-by: hd <hdshare@vip.qq.com>
1 parent 36f4781 commit 8bb4d76

File tree

4 files changed

+43
-8
lines changed

4 files changed

+43
-8
lines changed

docs/api/PluginOtherMethod.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@ Activity getTopActivity();
3333
```java
3434
void uploadDeviceStep(long step);
3535
```
36+
37+
## 获取头像链接
38+
39+
```java
40+
void getAvatarUrl(String username);
41+
42+
void getAvatarUrl(String username, boolean isBigHeadImg);
43+
```

docs/api/PluginStruct.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,25 @@
1111
MsgInfo {
1212
long getMsgId();// 消息Id
1313
int getType();// 消息类型
14-
String getTalker();// 发送者(接收的 群聊Id/好友Id)
15-
String getSendTalker();// 发送者(群聊中 发送者Id)
14+
String getTalker();// 聊天Id(群聊/私聊)
15+
String getSendTalker();// 发送者Id
1616
String getContent();// 消息内容
17+
1718
String getMsgSource();// 消息来源
1819
List<String> getAtUserList();// 艾特列表
19-
2020
boolean isAnnounceAll();// 公告通知全体
2121
boolean isNotifyAll();// 艾特通知全体
2222
boolean isAtMe();// 艾特我
23-
23+
24+
QuoteMsg getQuoteMsg();// 引用消息
25+
PatMsg getPatMsg();// 拍一拍消息
26+
2427
boolean isPrivateChat();// 私聊
2528
boolean isGroupChat();// 群聊
2629
boolean isOfficialAccount();// 公众号
2730
boolean isOpenIM();// 企业微信
2831
boolean isSend();// 自己发的
29-
32+
3033
boolean isText();// 文本
3134
boolean isImage();// 图片
3235
boolean isVoice();// 语音
@@ -45,7 +48,31 @@ MsgInfo {
4548
boolean isVideoNumberVideo();// 视频号视频
4649
boolean isNote();// 接龙
4750
boolean isQuote();// 引用
48-
boolean isPat()();// 拍一拍
51+
boolean isPat();// 拍一拍
4952
boolean isFile();// 文件
5053
}
54+
55+
QuoteMsg {
56+
String getMsgSource();// 消息来源
57+
String getSvrId();
58+
String getChatUsr();// 聊天Id(群聊/私聊)
59+
String getCreateTime();// 创建时间
60+
String getDisplayName();// 显示昵称
61+
String getStrId();
62+
String getFromUsr();// 发送者Id
63+
String getType();// 消息类型
64+
String getContent();// 消息内容
65+
}
66+
67+
PatMsg {
68+
String getChatUser();// 聊天Id(群聊/私聊)
69+
String getRecordNum();
70+
String getFromUser();// 发起者Id
71+
String getPattedUser();// 被拍者Id
72+
String getTemplate();// 模板内容
73+
String getCreateTime();// 创建时间
74+
String getReadStatus();
75+
String getSvrId();
76+
String getShowModifyTip();
77+
}
5178
```

plugins/hd/CustomAvatar/avatar.png

11.7 KB
Loading

plugins/hd/PatAutoReply/PatAutoReply.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
void onHandleMsg(Object msgInfo) {
33
if (msgInfo.isPat()) {
44
String myWxid = getLoginWxid();
5-
String fromUser = msgInfo.getSendTalker();
6-
String pattedUser = msgInfo.getContent();
5+
String fromUser = msgInfo.getPatMsg().getFromUser();
6+
String pattedUser = msgInfo.getPatMsg().getPattedUser();
77
if (!fromUser.equals(myWxid) && pattedUser.equals(myWxid)) {
88
sendText(msgInfo.getTalker(), "[AtWx=" + fromUser + "] 干啥子?");
99
}

0 commit comments

Comments
 (0)