Resolve #3158
This commit is contained in:
parent
3f8a72eb88
commit
de2b0224d6
@ -31,7 +31,6 @@
|
|||||||
<x-followers-you-know :user="user"/>
|
<x-followers-you-know :user="user"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<p v-if="user.host === null">{{ $t('last-used-at') }}: <b><mk-time :time="user.lastUsedAt"/></b></p>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -27,11 +27,4 @@ export default define(meta, (ps, user, app) => new Promise(async (res, rej) => {
|
|||||||
includeHasUnreadNotes: true,
|
includeHasUnreadNotes: true,
|
||||||
includeSecrets: isSecure
|
includeSecrets: isSecure
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Update lastUsedAt
|
|
||||||
User.update({ _id: user._id }, {
|
|
||||||
$set: {
|
|
||||||
lastUsedAt: new Date()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}));
|
}));
|
||||||
|
@ -76,7 +76,7 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
|
|||||||
$nin: followingIds.concat(mutedUserIds)
|
$nin: followingIds.concat(mutedUserIds)
|
||||||
},
|
},
|
||||||
isLocked: { $ne: true },
|
isLocked: { $ne: true },
|
||||||
lastUsedAt: {
|
updatedAt: {
|
||||||
$gte: new Date(Date.now() - ms('7days'))
|
$gte: new Date(Date.now() - ms('7days'))
|
||||||
},
|
},
|
||||||
host: null
|
host: null
|
||||||
|
@ -46,7 +46,6 @@ export default class Connection {
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'api': this.onApiRequest(body); break;
|
case 'api': this.onApiRequest(body); break;
|
||||||
case 'alive': this.onAlive(); break;
|
|
||||||
case 'readNotification': this.onReadNotification(body); break;
|
case 'readNotification': this.onReadNotification(body); break;
|
||||||
case 'subNote': this.onSubscribeNote(body); break;
|
case 'subNote': this.onSubscribeNote(body); break;
|
||||||
case 'sn': this.onSubscribeNote(body); break; // alias
|
case 'sn': this.onSubscribeNote(body); break; // alias
|
||||||
@ -77,16 +76,6 @@ export default class Connection {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@autobind
|
|
||||||
private onAlive() {
|
|
||||||
// Update lastUsedAt
|
|
||||||
User.update({ _id: this.user._id }, {
|
|
||||||
$set: {
|
|
||||||
'lastUsedAt': new Date()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
private onReadNotification(payload: any) {
|
private onReadNotification(payload: any) {
|
||||||
if (!payload.id) return;
|
if (!payload.id) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user