update 转发消息支持自转发
This commit is contained in:
@@ -158,7 +158,7 @@ object WeworkOperationImpl {
|
|||||||
fun relayMessage(
|
fun relayMessage(
|
||||||
message: WeworkMessageBean,
|
message: WeworkMessageBean,
|
||||||
titleList: List<String>,
|
titleList: List<String>,
|
||||||
receivedName: String,
|
receivedName: String?,
|
||||||
originalContent: String,
|
originalContent: String,
|
||||||
textType: Int,
|
textType: Int,
|
||||||
nameList: List<String>,
|
nameList: List<String>,
|
||||||
@@ -167,21 +167,46 @@ object WeworkOperationImpl {
|
|||||||
val startTime = System.currentTimeMillis()
|
val startTime = System.currentTimeMillis()
|
||||||
for (title in titleList) {
|
for (title in titleList) {
|
||||||
if (WeworkRoomUtil.intoRoom(title)) {
|
if (WeworkRoomUtil.intoRoom(title)) {
|
||||||
if (WeworkTextUtil.longClickMessageItem(
|
if (!receivedName.isNullOrEmpty()) {
|
||||||
//聊天消息列表 1ListView 0RecycleView xViewGroup
|
if (WeworkTextUtil.longClickMessageItem(
|
||||||
AccessibilityUtil.findOneByClazz(getRoot(), Views.ListView),
|
//聊天消息列表 1ListView 0RecycleView xViewGroup
|
||||||
textType,
|
AccessibilityUtil.findOneByClazz(getRoot(), Views.ListView),
|
||||||
receivedName,
|
textType,
|
||||||
originalContent,
|
receivedName,
|
||||||
"转发"
|
originalContent,
|
||||||
)
|
"转发"
|
||||||
) {
|
)
|
||||||
LogUtils.d("开始转发")
|
) {
|
||||||
if (relaySelectTarget(nameList, extraText)) {
|
LogUtils.d("开始转发")
|
||||||
LogUtils.d("$title: 转发成功")
|
if (relaySelectTarget(nameList, extraText)) {
|
||||||
|
LogUtils.d("$title: 转发成功")
|
||||||
|
} else {
|
||||||
|
LogUtils.e("$title: 转发失败")
|
||||||
|
error("$title: 转发失败 $originalContent")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LogUtils.d("$title: 转发失败")
|
LogUtils.e("$title: 长按条目失败")
|
||||||
error("$title: 转发失败 $originalContent")
|
error("$title: 长按条目失败 $originalContent")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (WeworkTextUtil.longClickMyMessageItem(
|
||||||
|
//聊天消息列表 1ListView 0RecycleView xViewGroup
|
||||||
|
AccessibilityUtil.findOneByClazz(getRoot(), Views.ListView),
|
||||||
|
textType,
|
||||||
|
originalContent,
|
||||||
|
"转发"
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
LogUtils.d("开始转发")
|
||||||
|
if (relaySelectTarget(nameList, extraText)) {
|
||||||
|
LogUtils.d("$title: 转发成功")
|
||||||
|
} else {
|
||||||
|
LogUtils.d("$title: 转发失败")
|
||||||
|
error("$title: 转发失败 $originalContent")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LogUtils.e("$title: 长按条目失败")
|
||||||
|
error("$title: 长按条目失败 $originalContent")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user