Add support for draft/event-playback
This commit is contained in:
@@ -13,6 +13,7 @@ const permanentCaps = [
|
||||
"setname",
|
||||
|
||||
"draft/chathistory",
|
||||
"draft/event-playback",
|
||||
|
||||
"soju.im/bouncer-networks",
|
||||
];
|
||||
@@ -160,6 +161,7 @@ export default class Client extends EventTarget {
|
||||
msgBatch = this.batches.get(msg.tags["batch"]);
|
||||
if (msgBatch) {
|
||||
msgBatch.messages.push(msg);
|
||||
msg.batch = msgBatch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
lib/irc.js
11
lib/irc.js
@@ -533,3 +533,14 @@ export function parseMembershipModes(str) {
|
||||
}
|
||||
return memberships;
|
||||
}
|
||||
|
||||
export function findBatchByType(msg, type) {
|
||||
var batch = msg.batch;
|
||||
while (batch) {
|
||||
if (batch.type === type) {
|
||||
return batch;
|
||||
}
|
||||
batch = batch.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user