Add support for labeled-response
It's just used to avoid mixing up messages coming from the server so far.
This commit is contained in:
16
lib/irc.js
16
lib/irc.js
@@ -544,3 +544,19 @@ export function findBatchByType(msg, type) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function getMessageLabel(msg) {
|
||||
if (msg.tags.label) {
|
||||
return msg.tags.label;
|
||||
}
|
||||
|
||||
var batch = msg.batch;
|
||||
while (batch) {
|
||||
if (batch.tags.label) {
|
||||
return batch.tags.label;
|
||||
}
|
||||
batch = batch.parent;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user