Skip to content

Commit

Permalink
define android ID in post constructor (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-wright authored Jul 8, 2023
2 parents a2bbf62 + 17dd73a commit 0b5b05e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/managers/PostManager.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
const RESTManager = require('./RESTManager');

class PostManager extends RESTManager {
constructor() {
super();
this.androidId = (Math.random() * 1e24).toString(36);
}

async create(contents, user) {
const id = (Math.random() * 1e24).toString(36);
const id = this.androidId;
const requestBody = {
publish_mode: "text_post",
text_post_app_info: '{"reply_control":0}',
Expand Down Expand Up @@ -32,4 +37,4 @@ class PostManager extends RESTManager {
}
}

module.exports = PostManager;
module.exports = PostManager;

0 comments on commit 0b5b05e

Please sign in to comment.