clean up debug prints
This commit is contained in:
parent
32fdddb20a
commit
e9361a9907
@ -59,7 +59,6 @@ export default class Connection {
|
|||||||
accessToken: string,
|
accessToken: string,
|
||||||
prepareStream: string | undefined,
|
prepareStream: string | undefined,
|
||||||
) {
|
) {
|
||||||
console.log("constructor", prepareStream);
|
|
||||||
this.wsConnection = wsConnection;
|
this.wsConnection = wsConnection;
|
||||||
this.subscriber = subscriber;
|
this.subscriber = subscriber;
|
||||||
if (user) this.user = user;
|
if (user) this.user = user;
|
||||||
@ -88,7 +87,6 @@ export default class Connection {
|
|||||||
|
|
||||||
this.subscriber.on(`user:${this.user.id}`, this.onUserEvent);
|
this.subscriber.on(`user:${this.user.id}`, this.onUserEvent);
|
||||||
}
|
}
|
||||||
console.log("prepare", prepareStream);
|
|
||||||
if (prepareStream) {
|
if (prepareStream) {
|
||||||
this.onWsConnectionMessage({
|
this.onWsConnectionMessage({
|
||||||
type: "utf8",
|
type: "utf8",
|
||||||
@ -185,8 +183,7 @@ export default class Connection {
|
|||||||
const tl = await client.getHomeTimeline();
|
const tl = await client.getHomeTimeline();
|
||||||
for (const t of tl.data) forSubscribe.push(t.id);
|
for (const t of tl.data) forSubscribe.push(t.id);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.log(e);
|
console.error(e);
|
||||||
console.error(e.response.data);
|
|
||||||
}
|
}
|
||||||
} else if (simpleObj.stream === "public:local") {
|
} else if (simpleObj.stream === "public:local") {
|
||||||
this.currentSubscribe.push(["public:local"]);
|
this.currentSubscribe.push(["public:local"]);
|
||||||
@ -247,7 +244,6 @@ export default class Connection {
|
|||||||
|
|
||||||
for (const obj of objs) {
|
for (const obj of objs) {
|
||||||
const { type, body } = obj;
|
const { type, body } = obj;
|
||||||
// console.log(type, body);
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "readNotification":
|
case "readNotification":
|
||||||
this.onReadNotification(body);
|
this.onReadNotification(body);
|
||||||
|
Loading…
Reference in New Issue
Block a user