Skip to content

Commit

Permalink
feat: ALWAYS_FORWARD_TG_FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Dec 29, 2024
1 parent 1ce3b40 commit 4e860b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main/src/constants/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum flags {
DISABLE_OFFLINE_NOTICE = 1 << 15,
HIDE_ALL_QQ_NUMBER = 1 << 16,
NAME_LOCKED = 1 << 17,
ALWAYS_FORWARD_TG_FILE = 1 << 18,
}

export default flags;
2 changes: 1 addition & 1 deletion main/src/services/ForwardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ export default class ForwardService {
useText(`文件:${fileNameAttribute ? fileNameAttribute.fileName : ''}\n` +
`类型:${file.mimeType}\n` +
`大小:${file.size}`);
if (file.size.leq(50 * 1024 * 1024)) {
if (file.size.leq(50 * 1024 * 1024) || (pair.flags | this.instance.flags) & flags.ALWAYS_FORWARD_TG_FILE) {
useText('\n');
const file = await createTempFile();
tempFiles.push(file);
Expand Down

0 comments on commit 4e860b7

Please sign in to comment.