* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update CHANGELOG.md

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update CHANGELOG.md

* Update CHANGELOG.md

* wip

* Update CHANGELOG.md

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo 2018-10-07 11:06:17 +09:00 committed by GitHub
parent 0b98a2364b
commit d0570d7fe3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
126 changed files with 1812 additions and 2273 deletions

View file

@ -30,7 +30,6 @@
<script lang="ts">
import Vue from 'vue';
import { MessagingStream } from '../../scripts/streaming/messaging';
import XMessage from './messaging-room.message.vue';
import XForm from './messaging-room.form.vue';
import { url } from '../../../config';
@ -72,7 +71,7 @@ export default Vue.extend({
},
mounted() {
this.connection = new MessagingStream((this as any).os, this.$store.state.i, this.user.id);
this.connection =((this as any).os.stream.connectToChannel('messaging', { otherparty: this.user.id });
this.connection.on('message', this.onMessage);
this.connection.on('read', this.onRead);
@ -92,9 +91,7 @@ export default Vue.extend({
},
beforeDestroy() {
this.connection.off('message', this.onMessage);
this.connection.off('read', this.onRead);
this.connection.close();
this.connection.dispose();
if (this.isNaked) {
window.removeEventListener('scroll', this.onScroll);
@ -166,6 +163,7 @@ export default Vue.extend({
},
onMessage(message) {
console.log(message);
//
if (this.$store.state.device.enableSounds) {
const sound = new Audio(`${url}/assets/message.mp3`);