(@NotNull Collection<String> accounts, long typeId, @NotNull Binary fullEncodedProtocol)
| 1260 | } |
| 1261 | |
| 1262 | public int sendAccounts(@NotNull Collection<String> accounts, long typeId, @NotNull Binary fullEncodedProtocol) { // OnlineSend sender |
| 1263 | int accountCount = accounts.size(); |
| 1264 | if (accountCount == 1) { |
| 1265 | var it = accounts.iterator(); |
| 1266 | if (it.hasNext()) // 不确定accounts是否稳定,所以还是判断一下保险 |
| 1267 | return sendAccountDirect(it.next(), typeId, fullEncodedProtocol, false); |
| 1268 | } else if (accountCount > 1) { |
| 1269 | return sendAccountsDirect(accounts instanceof Set ? accounts : new HashSet<>(accounts), |
| 1270 | typeId, fullEncodedProtocol, false); |
| 1271 | // var p = providerApp.zeze.newProcedure(() -> { |
| 1272 | // sendAccountsEmbed(accounts, typeId, fullEncodedProtocol, sender); |
| 1273 | // return Procedure.Success; |
| 1274 | // }, "Online.sendAccounts"); |
| 1275 | // if (accounts.size() > 1) |
| 1276 | // Task.executeUnsafe(p); |
| 1277 | // else |
| 1278 | // providerApp.zeze.getTaskOneByOneByKey().executeCyclicBarrier(accounts, p, null, DispatchMode.Normal); |
| 1279 | } |
| 1280 | return 0; |
| 1281 | } |
| 1282 | |
| 1283 | /** |
| 1284 | * 给账号所有的登录终端发送消息。 |
no test coverage detected