Skip to content

Commit

Permalink
🗃️ DriveFile: add editing_session_key column (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlinagora committed Jun 20, 2024
1 parent 7718421 commit 83a4dd1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tdrive/backend/node/src/services/documents/entities/drive-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export type DriveScope = "personal" | "shared";
globalIndexes: [
["company_id", "parent_id"],
["company_id", "is_in_trash"],

// Needs to be globally unique (no `company_id`) because it's the only key that OnlyOffice
// will return to us to identify the document being edited. Convenient for other plugins too.
["editing_session_key"],
],
primaryKey: [["company_id"], "id"],
type: TYPE,
Expand Down Expand Up @@ -87,6 +91,15 @@ export class DriveFile {
@Column("access_info", "encoded_json")
access_info: AccessInformation;

/**
* If this field is non-null, then an editing session is in progress (probably in OnlyOffice).
* Should be in the format `appid-timestamp-hexuuid` where `appid` and `timestamp` have no `-`
* characters.
*/
@Type(() => String)
@Column("editing_session_key", "string")
editing_session_key: string;

@Type(() => String)
@Column("content_keywords", "string")
content_keywords: string;
Expand Down

0 comments on commit 83a4dd1

Please sign in to comment.