Spaces:
Running
Running
Download models/Dialog.js from 4send/messenger: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/4send/messenger/resolve/3eed13eb90e615af90ff1b6efdcb9ee6eee182cd/models/Dialog.js
- Command line
-
hf download hf://spaces/4send/messenger@3eed13eb90e615af90ff1b6efdcb9ee6eee182cd/models/Dialog.js
-
curl -L -o Dialog.js https://huggingface.co/spaces/4send/messenger/resolve/3eed13eb90e615af90ff1b6efdcb9ee6eee182cd/models/Dialog.js
1.22 kB
| const mongoose = require('mongoose'); | |
| const DialogSchema = new mongoose.Schema({ | |
| dialog_id: { type: String, unique: true, index: true }, | |
| participants: [{ type: String, index: true }], | |
| lastMessageText: { type: String }, | |
| lastSender: { type: String }, | |
| lastMessageTimestamp: { type: Date, index: true }, | |
| unreadCounts: { type: Map, of: Number, default: {} }, | |
| lastIsAudio: { type: Boolean, default: false }, | |
| lastIsMusic: { type: Boolean, default: false }, | |
| lastIsVideoNote: { type: Boolean, default: false }, | |
| lastFileUrl: { type: String, default: null }, | |
| lastFileName: { type: String, default: null }, | |
| copyRestriction: { type: Boolean, default: false }, | |
| autoDeleteTimer: { type: Number, default: 0 }, | |
| forwardRestriction: { type: Boolean, default: false }, | |
| lastCallType: { type: String, default: null }, | |
| lastCallDuration: { type: Number, default: 0 }, | |
| lastCallWithVideo: { type: Boolean, default: false }, | |
| screenshotNotification: { type: Boolean, default: false }, | |
| lastIsEncrypted: { type: Boolean, default: false } | |
| }); | |
| DialogSchema.index({ participants: 1, lastMessageTimestamp: -1 }); | |
| module.exports = mongoose.model('Dialog', DialogSchema); | |