make sure we only send DELETEMSG to supporting clients

This commit is contained in:
emerson 2022-02-09 07:51:39 -05:00
parent 0e1117e796
commit e86e911e3d

View file

@ -497,7 +497,8 @@ export class IRCUser {
tags.set('account', sourceUser.accountName);
tags.set('time', new Date(event["origin_server_ts"]).toISOString())
this.clients.forEach((client) => {
client.sendMessage(sourceUser.getMask(), 'DELETEMSG', [targetChannel.name, reason], tags);
if (client.enabledCaps.has("draft/edit-message"))
client.sendMessage(sourceUser.getMask(), 'DELETEMSG', [targetChannel.name, reason], tags);
});
}