Some bug fixes
This commit is contained in:
@ -8,7 +8,7 @@ import MiOS from '../../mios';
|
||||
export class DriveStream extends Stream {
|
||||
constructor(os: MiOS, me) {
|
||||
super(os, 'drive', {
|
||||
i: me.account.token
|
||||
i: me.token
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -10,13 +10,13 @@ import MiOS from '../../mios';
|
||||
export class HomeStream extends Stream {
|
||||
constructor(os: MiOS, me) {
|
||||
super(os, '', {
|
||||
i: me.account.token
|
||||
i: me.token
|
||||
});
|
||||
|
||||
// 最終利用日時を更新するため定期的にaliveメッセージを送信
|
||||
setInterval(() => {
|
||||
this.send({ type: 'alive' });
|
||||
me.account.lastUsedAt = new Date();
|
||||
me.lastUsedAt = new Date();
|
||||
}, 1000 * 60);
|
||||
|
||||
// 自分の情報が更新されたとき
|
||||
|
@ -8,7 +8,7 @@ import MiOS from '../../mios';
|
||||
export class MessagingIndexStream extends Stream {
|
||||
constructor(os: MiOS, me) {
|
||||
super(os, 'messaging-index', {
|
||||
i: me.account.token
|
||||
i: me.token
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ import MiOS from '../../mios';
|
||||
export class MessagingStream extends Stream {
|
||||
constructor(os: MiOS, me, otherparty) {
|
||||
super(os, 'messaging', {
|
||||
i: me.account.token,
|
||||
i: me.token,
|
||||
otherparty
|
||||
});
|
||||
|
||||
(this as any).on('_connected_', () => {
|
||||
this.send({
|
||||
i: me.account.token
|
||||
i: me.token
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import MiOS from '../../mios';
|
||||
export class OthelloGameStream extends Stream {
|
||||
constructor(os: MiOS, me, game) {
|
||||
super(os, 'othello-game', {
|
||||
i: me ? me.account.token : null,
|
||||
i: me ? me.token : null,
|
||||
game: game.id
|
||||
});
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import MiOS from '../../mios';
|
||||
export class OthelloStream extends Stream {
|
||||
constructor(os: MiOS, me) {
|
||||
super(os, 'othello', {
|
||||
i: me.account.token
|
||||
i: me.token
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user