Improve DX for message sending
This commit is contained in:
@@ -141,7 +141,7 @@ export class DMService {
|
||||
let uploadId = ""
|
||||
if (attachments) {
|
||||
const uploader = new FileUploadService(this.token)
|
||||
uploadId = await uploader.uploadFiles(this.chatid, this.userid, attachments, progressListener!)
|
||||
uploadId = await uploader.uploadFiles(tempMsgId, this.chatid, this.userid, attachments, progressListener!)
|
||||
}
|
||||
try {
|
||||
const resp = await this.client.post<Message>("chat/dm/finishMessage", <FinishMessageReq>{
|
||||
|
||||
@@ -4,7 +4,7 @@ import {FileUploadService} from './fileUploadService.js';
|
||||
describe("fileUploadService", () => {
|
||||
it('should upload files', async () => {
|
||||
const service = new FileUploadService("");
|
||||
const uploadId = await service.uploadFiles("", "", [], {
|
||||
const uploadId = await service.uploadFiles("","", "", [], {
|
||||
fileProgressUpdate: () => {}
|
||||
})
|
||||
expect(uploadId).toBe("MockUploadId")
|
||||
|
||||
Reference in New Issue
Block a user