merge
This commit is contained in:
@ -2,6 +2,7 @@ import {Client} from './Client.js';
|
||||
import {createNotification} from '../utils/noticeUtils.js'
|
||||
import { lastView } from '../index.js';
|
||||
import ProfilePageView from '../views/ProfilePageView.js';
|
||||
import Search from '../views/Search.js';
|
||||
|
||||
export default class Notice {
|
||||
|
||||
@ -22,7 +23,7 @@ export default class Notice {
|
||||
this._socket.onclose = _ => this._socket = undefined;
|
||||
this._socket.onmessage = message => {
|
||||
const data = JSON.parse(message.data);
|
||||
console.log(data)
|
||||
//console.log(data)
|
||||
|
||||
if (data.type === 'friend_request') {
|
||||
this.friend_request(data.author);
|
||||
@ -52,6 +53,9 @@ export default class Notice {
|
||||
lastView.profile.online = status;
|
||||
lastView.loadFriendshipStatus();
|
||||
}
|
||||
else if (lastView instanceof Search) {
|
||||
lastView.display_specific_user(user.id);
|
||||
}
|
||||
}
|
||||
|
||||
online(user) {
|
||||
|
Reference in New Issue
Block a user