Skip to content

Commit

Permalink
Better token management at older features
Browse files Browse the repository at this point in the history
  • Loading branch information
a2br committed Dec 30, 2020
1 parent 718767d commit f7f2b6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/account_types/Student.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ export class Student extends Account {
*/
async getMessages(): Promise<message[]> {
const received = await getMessages(this.account.id, this.token, "received");
this.token = received.token;
const sent = await getMessages(this.account.id, this.token, "sent");

this.token = sent.token;
const messages = received;
messages.data.messages.sent = sent.data.messages.sent;
const cleaned = cleanMessages(messages, this);
Expand Down

0 comments on commit f7f2b6a

Please sign in to comment.