mirror of
https://codeberg.org/emersion/gamja.git
synced 2025-06-11 04:40:25 -04:00
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:
parent
34078d5da7
commit
0dfb7623db
3 changed files with 43 additions and 5 deletions
lib
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue