fix: number of sites count

This commit is contained in:
cogwheel0
2025-09-28 14:25:35 +05:30
parent 75b744d061
commit ae20035900
2 changed files with 84 additions and 2 deletions

View File

@@ -1205,7 +1205,24 @@ class ApiService {
entry.forEach((key, value) {
statusMap[key.toString()] = value;
});
return ChatStatusUpdate.fromJson(statusMap);
final statusUpdate = ChatStatusUpdate.fromJson(statusMap);
// Debug log to help diagnose template issues
if (statusUpdate.description?.contains('{{count}}') == true) {
DebugLogger.log(
'template-placeholder-found',
scope: 'api/chat',
data: {
'description': statusUpdate.description,
'count': statusUpdate.count,
'urls': statusUpdate.urls.length,
'items': statusUpdate.items.length,
'action': statusUpdate.action,
},
);
}
return statusUpdate;
} catch (e) {
// Log the error and skip this entry
DebugLogger.log(