mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-21 04:25:27 -04:00
Fix message event double-send.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "revolt.js",
|
||||
"version": "4.0.0-alpha.4",
|
||||
"version": "4.0.0-alpha.5",
|
||||
"main": "dist/index.js",
|
||||
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
|
||||
"author": "Paul Makles <insrt.uk>",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
export * from './Client';
|
||||
export { Channel, User, Message } from './api/objects';
|
||||
|
||||
export const LIBRARY_VERSION = '4.0.0-alpha.4';
|
||||
export const LIBRARY_VERSION = '4.0.0-alpha.5';
|
||||
|
||||
export const defaultConfig = {
|
||||
apiURL: 'https://api.revolt.chat',
|
||||
|
||||
@@ -58,6 +58,7 @@ export default class Channels extends Collection<Channel> {
|
||||
this.getThrow(id);
|
||||
let message = await this.client.req<'POST', '/channels/:id/messages'>('POST', `/channels/${id}/messages` as any, data);
|
||||
if (!this.client.messages.includes(id)) {
|
||||
this.client.messages.push(id);
|
||||
this.client.emit('message', message);
|
||||
}
|
||||
return message;
|
||||
|
||||
Reference in New Issue
Block a user