-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added chat.getDeletedMessages since specific date (#13010)
- Loading branch information
1 parent
7608b18
commit 70225a5
Showing
5 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { api, credentials, request } from './api-data'; | ||
|
||
export const sendSimpleMessage = ({ roomId, text = 'test message' }) => { | ||
if (!roomId) { | ||
throw new Error('"roomId" is required in "sendSimpleMessage" test helper'); | ||
} | ||
|
||
return request.post(api('chat.sendMessage')) | ||
.set(credentials) | ||
.send({ | ||
message: { | ||
rid: roomId, | ||
text, | ||
}, | ||
}); | ||
}; | ||
|
||
export const deleteMessage = ({ roomId, msgId }) => { | ||
if (!roomId) { | ||
throw new Error('"roomId" is required in "deleteMessage" test helper'); | ||
} | ||
if (!msgId) { | ||
throw new Error('"msgId" is required in "deleteMessage" test helper'); | ||
} | ||
|
||
return request.post(api('chat.delete')) | ||
.set(credentials) | ||
.send({ | ||
roomId, | ||
msgId, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters