move seding files and work with account data to the linkpearl level

This commit is contained in:
Aine
2022-10-02 13:51:58 +03:00
parent f585e6ba06
commit ed5765b42a
7 changed files with 29 additions and 76 deletions

View File

@@ -31,8 +31,8 @@ func NewFile(name string, content []byte) *File {
return file
}
func (f *File) Convert() mautrix.ReqUploadMedia {
return mautrix.ReqUploadMedia{
func (f *File) Convert() *mautrix.ReqUploadMedia {
return &mautrix.ReqUploadMedia{
ContentBytes: f.Content,
Content: bytes.NewReader(f.Content),
ContentLength: int64(f.Length),