This commit is contained in:
syuilo
2021-05-27 17:15:08 +09:00
parent c92744c3d3
commit ae2267220b
23 changed files with 69 additions and 386 deletions

View File

@ -139,7 +139,7 @@ export default defineComponent({
});
}
this.connection = os.stream.useSharedConnection('drive');
this.connection = os.stream.useChannel('drive');
this.connection.on('fileCreated', this.onStreamDriveFileCreated);
this.connection.on('fileUpdated', this.onStreamDriveFileUpdated);
@ -301,7 +301,7 @@ export default defineComponent({
}
}).then(({ canceled, result: url }) => {
if (canceled) return;
os.api('drive/files/upload_from_url', {
os.api('drive/files/upload-from-url', {
url: url,
folderId: this.folder ? this.folder.id : undefined
});

View File

@ -71,7 +71,7 @@ export default defineComponent({
},
mounted() {
this.connection = os.stream.useSharedConnection('main');
this.connection = os.stream.useChannel('main');
this.connection.on('follow', this.onFollowChange);
this.connection.on('unfollow', this.onFollowChange);

View File

@ -109,7 +109,7 @@ export default defineComponent({
this.readObserver.observe(this.$el);
this.connection = os.stream.useSharedConnection('main');
this.connection = os.stream.useChannel('main');
this.connection.on('readAllNotifications', () => this.readObserver.unobserve(this.$el));
}
},

View File

@ -87,7 +87,7 @@ export default defineComponent({
},
mounted() {
this.connection = os.stream.useSharedConnection('main');
this.connection = os.stream.useChannel('main');
this.connection.on('notification', this.onNotification);
},

View File

@ -92,33 +92,33 @@ export default defineComponent({
this.query = {
antennaId: this.antenna
};
this.connection = os.stream.connectToChannel('antenna', {
this.connection = os.stream.useChannel('antenna', {
antennaId: this.antenna
});
this.connection.on('note', prepend);
} else if (this.src == 'home') {
endpoint = 'notes/timeline';
this.connection = os.stream.useSharedConnection('homeTimeline');
this.connection = os.stream.useChannel('homeTimeline');
this.connection.on('note', prepend);
this.connection2 = os.stream.useSharedConnection('main');
this.connection2 = os.stream.useChannel('main');
this.connection2.on('follow', onChangeFollowing);
this.connection2.on('unfollow', onChangeFollowing);
} else if (this.src == 'local') {
endpoint = 'notes/local-timeline';
this.connection = os.stream.useSharedConnection('localTimeline');
this.connection = os.stream.useChannel('localTimeline');
this.connection.on('note', prepend);
} else if (this.src == 'social') {
endpoint = 'notes/hybrid-timeline';
this.connection = os.stream.useSharedConnection('hybridTimeline');
this.connection = os.stream.useChannel('hybridTimeline');
this.connection.on('note', prepend);
} else if (this.src == 'global') {
endpoint = 'notes/global-timeline';
this.connection = os.stream.useSharedConnection('globalTimeline');
this.connection = os.stream.useChannel('globalTimeline');
this.connection.on('note', prepend);
} else if (this.src == 'mentions') {
endpoint = 'notes/mentions';
this.connection = os.stream.useSharedConnection('main');
this.connection = os.stream.useChannel('main');
this.connection.on('mention', prepend);
} else if (this.src == 'directs') {
endpoint = 'notes/mentions';
@ -130,14 +130,14 @@ export default defineComponent({
prepend(note);
}
};
this.connection = os.stream.useSharedConnection('main');
this.connection = os.stream.useChannel('main');
this.connection.on('mention', onNote);
} else if (this.src == 'list') {
endpoint = 'notes/user-list-timeline';
this.query = {
listId: this.list
};
this.connection = os.stream.connectToChannel('userList', {
this.connection = os.stream.useChannel('userList', {
listId: this.list
});
this.connection.on('note', prepend);
@ -148,7 +148,7 @@ export default defineComponent({
this.query = {
channelId: this.channel
};
this.connection = os.stream.connectToChannel('channel', {
this.connection = os.stream.useChannel('channel', {
channelId: this.channel
});
this.connection.on('note', prepend);