|
|
@@ -703,6 +703,18 @@ object WeworkOperationImpl {
|
|
|
)
|
|
|
return false
|
|
|
}
|
|
|
+ if (!exitGroup(message.isExit)) {
|
|
|
+ uploadCommandResult(
|
|
|
+ message,
|
|
|
+ ExecCallbackBean.ERROR_GROUP_EXIT,
|
|
|
+ "进入房间成功 群改名成功 群拉人成功 群公告成功 群备注成功 禁止改群名成功 退出群聊失败",
|
|
|
+ startTime,
|
|
|
+ listOf(),
|
|
|
+ listOf(groupName),
|
|
|
+ metaJson = GsonUtils.toJson(metaJson)
|
|
|
+ )
|
|
|
+ return false
|
|
|
+ }
|
|
|
saveToContract()
|
|
|
// getGroupQrcode(groupName, groupRemark)
|
|
|
uploadCommandResult(
|
|
|
@@ -5023,6 +5035,30 @@ object WeworkOperationImpl {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+ private fun exitGroup(isExit: Boolean): Boolean {
|
|
|
+ if (!isExit) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if (WeworkRoomUtil.intoGroupManager()) {
|
|
|
+ val node = AccessibilityUtil.scrollAndFindByText(
|
|
|
+ WeworkController.weworkService,
|
|
|
+ getRoot(),
|
|
|
+ "退出群聊",
|
|
|
+ exact = true
|
|
|
+ )
|
|
|
+ if (node != null) {
|
|
|
+ AccessibilityUtil.performClick(node)
|
|
|
+ sleep(Constant.POP_WINDOW_INTERVAL)
|
|
|
+ val textView = AccessibilityUtil.findOneByText(getRoot(), "退出", exact = true)
|
|
|
+ if (textView != null) {
|
|
|
+ AccessibilityUtil.performClick(textView)
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改群模板
|
|
|
*/
|