Spaces:
Running
Running
Download models/ChatAction.js from 4send/messenger: direct link, hf CLI and curl.
- Browser
- Download file 394 Bytes
-
https://huggingface.co/spaces/4send/messenger/resolve/main/models/ChatAction.js
- Command line
-
hf download hf://spaces/4send/messenger/models/ChatAction.js
-
curl -L -o ChatAction.js https://huggingface.co/spaces/4send/messenger/resolve/main/models/ChatAction.js
394 Bytes
| const mongoose = require('mongoose'); | |
| const ActionSchema = new mongoose.Schema({ | |
| user: { type: String, index: true }, | |
| contact: { type: String, index: true }, | |
| type: { type: String, enum: ['pin', 'archive', 'mute'] } | |
| }); | |
| ActionSchema.index({ user: 1, contact: 1 }); | |
| ActionSchema.index({ user: 1, contact: 1, type: 1 }); | |
| module.exports = mongoose.model('ChatAction', ActionSchema); | |