Fix starting PMs

This commit is contained in:
abalabahaha
2016-04-23 10:15:29 -07:00
parent a5517c2c3b
commit 619139f871
4 changed files with 4 additions and 6 deletions

View File

@@ -584,7 +584,7 @@ export default class InternalClient {
return Promise.reject(new Error("Unable to resolve resUser to a User"));
}
// start the PM
return this.apiRequest("post", Endpoints.USER_CHANNELS(this.user.id), true, {
return this.apiRequest("post", Endpoints.ME_CHANNELS, true, {
recipient_id: user.id
})
.then(res => {

View File

@@ -6,9 +6,9 @@ export const Endpoints = {
LOGIN: `${API}/auth/login`,
LOGOUT: `${API}/auth/logout`,
ME: `${API}/users/@me`,
ME: `${API}/users/@me/channels`,
ME_SERVER: (serverID) => `${Endpoints.ME}/guilds/${serverID}`,
GATEWAY: `${API}/gateway`,
USER_CHANNELS: (userID) => `${API}/users/${userID}/channels`,
AVATAR : (userID, avatar) => `${API}/users/${userID}/avatars/${avatar}.jpg`,
INVITE: (id) => `${API}/invite/${id}`,