Unverified Commit b1433422 authored by Athurg Gooth's avatar Athurg Gooth Committed by GitHub

fix: trim the dirname of attachment send by telegram bot (#2651)

parent f184d652
......@@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"path"
"strconv"
"unicode/utf16"
......@@ -84,7 +85,7 @@ func (t *TelegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
// Fill the common field of create
create := store.Resource{
CreatorID: creatorID,
Filename: attachment.FileName,
Filename: path.Base(attachment.FileName),
Type: attachment.GetMimeType(),
Size: attachment.FileSize,
MemoID: &memoMessage.ID,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment