This commit is contained in:
haad 2016-01-19 22:06:00 +08:00
parent 11dc672e31
commit 2bfa82e3e8
2 changed files with 2 additions and 3 deletions

View File

@ -43,8 +43,6 @@ class OrbitClient {
_iterator(channel, password, options) {
const messages = this._getMessages(channel, password, options);
// Iterator interface implementation
let currentIndex = 0;
let iterator = {
[Symbol.iterator]() {
@ -59,6 +57,7 @@ class OrbitClient {
return item;
},
collect: () => messages
// TODO: add first() and last() ?
}
return iterator;

View File

@ -88,7 +88,7 @@ async(() => {
// Modes
const password = 'hello';
const channelModes;
let channelModes;
channelModes = orbit.channel(channel).setMode({ mode: "+r", params: { password: password } }); // { modes: { r: { password: 'hello' } } }
channelModes = orbit.channel(channel, password).setMode({ mode: "+w", params: { ops: [orbit.user.id] } }); // { modes: { ... } }
channelModes = orbit.channel(channel, password).setMode({ mode: "-r" }); // { modes: { ... } }