mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
- Introduces a new Music Library system for managing favorites (tracks, playlists, releases), replacing the previous TrackLike model. - Completely revamps the Studio TV profile page, adding live statistics, stream configuration, restream management, and media URL display. - Enhances the media player with a custom seekbar and improved audio playback logic for MPD and non-MPD sources. - Lays foundational groundwork for chat encryption with new models and APIs. - Refactors critical UI components like PlaylistView and PagePanel. - Standardizes monorepo development scripts to use npm. - Updates comty.js submodule and adds various new UI components.
41 lines
670 B
JavaScript
41 lines
670 B
JavaScript
export default {
|
|
name: "ChatKey",
|
|
collection: "chat_keys",
|
|
schema: {
|
|
user_id_1: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
user_id_2: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
encrypted_key_1: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
encrypted_key_2: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
created_at: {
|
|
type: Number,
|
|
default: () => new Date().getTime(),
|
|
},
|
|
updated_at: {
|
|
type: Number,
|
|
default: () => new Date().getTime(),
|
|
},
|
|
},
|
|
extend: {
|
|
async findByUsers(user1, user2) {
|
|
return await this.findOne({
|
|
$or: [
|
|
{ user_id_1: user1, user_id_2: user2 },
|
|
{ user_id_1: user2, user_id_2: user1 },
|
|
],
|
|
})
|
|
},
|
|
},
|
|
}
|