Automated Action 545563e776 Implement comprehensive real-time chat API with NestJS
- Complete NestJS TypeScript implementation with WebSocket support
- Direct messaging (DM) and group chat functionality
- End-to-end encryption with AES encryption and key pairs
- Media file support (images, videos, audio, documents) up to 100MB
- Push notifications with Firebase Cloud Messaging integration
- Mention alerts and real-time typing indicators
- User authentication with JWT and Passport
- SQLite database with TypeORM entities and relationships
- Comprehensive API documentation with Swagger/OpenAPI
- File upload handling with secure access control
- Online/offline status tracking and presence management
- Message editing, deletion, and reply functionality
- Notification management with automatic cleanup
- Health check endpoint for monitoring
- CORS configuration for cross-origin requests
- Environment-based configuration management
- Structured for Flutter SDK integration

Features implemented:
 Real-time messaging with Socket.IO
 User registration and authentication
 Direct messages and group chats
 Media file uploads and management
 End-to-end encryption
 Push notifications
 Mention alerts
 Typing indicators
 Message read receipts
 Online status tracking
 File access control
 Comprehensive API documentation

Ready for Flutter SDK development and production deployment.
2025-06-21 17:13:05 +00:00

39 lines
983 B
JavaScript

export default (function (o, c, d) {
var sortBy = function sortBy(method, dates) {
if (!dates || !dates.length || dates.length === 1 && !dates[0] || dates.length === 1 && Array.isArray(dates[0]) && !dates[0].length) {
return null;
}
if (dates.length === 1 && dates[0].length > 0) {
var _dates = dates;
dates = _dates[0];
}
dates = dates.filter(function (date) {
return date;
});
var result;
var _dates2 = dates;
result = _dates2[0];
for (var i = 1; i < dates.length; i += 1) {
if (!dates[i].isValid() || dates[i][method](result)) {
result = dates[i];
}
}
return result;
};
d.max = function () {
var args = [].slice.call(arguments, 0); // eslint-disable-line prefer-rest-params
return sortBy('isAfter', args);
};
d.min = function () {
var args = [].slice.call(arguments, 0); // eslint-disable-line prefer-rest-params
return sortBy('isBefore', args);
};
});