merge with Chatte
This commit is contained in:
@ -8,10 +8,13 @@ class Channels {
|
||||
|
||||
async createChannel(users_id, reload) {
|
||||
|
||||
let null_id = false;
|
||||
users_id.forEach(user_id => {
|
||||
if (user_id == null)
|
||||
return console.log("createChannel error, null id;");
|
||||
null_id = true;
|
||||
});
|
||||
if (null_id)
|
||||
return console.log(users_id, "createChannel error, null id;");
|
||||
|
||||
let response = await this.client._post("/api/chat/", {
|
||||
users_id:users_id
|
||||
|
@ -185,6 +185,9 @@ export default class extends AbstractView {
|
||||
messages.appendChild(text);
|
||||
});
|
||||
|
||||
// Scroll to the bottom of messages
|
||||
messages.scrollTop = messages.scrollHeight;
|
||||
|
||||
}
|
||||
|
||||
async hideChat() {
|
||||
@ -212,7 +215,6 @@ export default class extends AbstractView {
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user