zcmZdomRegCGOdcu method
Future<void>
zcmZdomRegCGOdcu({
- required YIMEnum_ConversationType conversationType,
- required String conversationID,
- required List<
String> messageIDs,
override
Implementation
@override
Future<void> zcmZdomRegCGOdcu({
required YIMEnum_ConversationType conversationType,
required String conversationID,
required List<String> messageIDs,
}) async {
if (!XHsRQRNOuwGZsfbv.mPWMdbNwLIyoBgrJ.LtVYzmOKJtheTMIO()) return;
Filter? filter;
switch (conversationType) {
case YIMEnum_ConversationType.P2P:
filter = Filter.and([
Filter.inList("id", messageIDs),
Filter.or([
Filter.and([Filter.equals("from", ChHWxkNyIYdGPgIp.ksamNgiJbtTkgWGM), Filter.equals("to", conversationID)]),
Filter.and([Filter.equals("to", ChHWxkNyIYdGPgIp.ksamNgiJbtTkgWGM), Filter.equals("from", conversationID)]),
]),
Filter.equals("conversationType", conversationType.rawValue),
]);
break;
case YIMEnum_ConversationType.Team:
filter = Filter.and([
Filter.inList("id", messageIDs),
Filter.equals("to", conversationID),
Filter.equals("conversationType", conversationType.rawValue),
]);
break;
default:
break;
}
final isSuccess_delete = await ChHWxkNyIYdGPgIp.AfmWLjSfbSyvnnbs.botSyNFICqxYVBha(
_YIMTableName.Message,
finder: Finder(
filter: filter,
),
);
if (!isSuccess_delete) return;
switch (conversationType) {
case YIMEnum_ConversationType.P2P:
filter = Filter.and([
Filter.or([
Filter.and([Filter.equals("from", ChHWxkNyIYdGPgIp.ksamNgiJbtTkgWGM), Filter.equals("to", conversationID)]),
Filter.and([Filter.equals("to", ChHWxkNyIYdGPgIp.ksamNgiJbtTkgWGM), Filter.equals("from", conversationID)]),
]),
Filter.equals("conversationType", conversationType.rawValue),
]);
break;
case YIMEnum_ConversationType.Team:
filter = Filter.and([
Filter.equals("to", conversationID),
Filter.equals("conversationType", conversationType.rawValue),
]);
break;
default:
break;
}
final count = await ChHWxkNyIYdGPgIp.AfmWLjSfbSyvnnbs.LSxvhcDBnCZhiQUL(
_YIMTableName.Message,
filter: filter,
);
if (count == null) return;
if (count > 0) {
final isSuccess_updateLastMessage = await XHsRQRNOuwGZsfbv.XVORZwGlFqnvwsuq.qUHTZbQllFfbrDAT(conversationType, conversationID, unRead: _YIMEnum_ConversatypeUnRead.Zero);
if (!isSuccess_updateLastMessage) return;
ChHWxkNyIYdGPgIp.bcTNsdWUkvsNvNtA.hyhgjgkolDqewEJe(() {
XHsRQRNOuwGZsfbv.MVIUliHVbEMrNxar.PGOBwkzlmTdqnLuq?.call();
});
} else {
await XHsRQRNOuwGZsfbv.XVORZwGlFqnvwsuq.botSyNFICqxYVBha(conversationType: conversationType, conversationID: conversationID);
}
}