Skip to content

Commit

Permalink
Add sendResult to AceComm callback forwarding
Browse files Browse the repository at this point in the history
Most people probably interface with AceComm rather than CTL directly, so
it makes sense to pass the send result from CTL fully through the chain.

One downside is that because AceComm currently appends its own textLen
argument, we're forced to effectively sandwich it by appending
sendResult to the end of the list.
  • Loading branch information
Meorawr authored and Nevcairiel committed May 5, 2024
1 parent 23d0dae commit 75b51f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AceComm-3.0/AceComm-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TODO: Time out old data rotting around from dead senders? Not a HUGE deal since
local CallbackHandler = LibStub("CallbackHandler-1.0")
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")

local MAJOR, MINOR = "AceComm-3.0", 12
local MAJOR, MINOR = "AceComm-3.0", 13
local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)

if not AceComm then return end
Expand Down Expand Up @@ -97,8 +97,8 @@ function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callb

local ctlCallback = nil
if callbackFn then
ctlCallback = function(sent)
return callbackFn(callbackArg, sent, textlen)
ctlCallback = function(sent, sendResult)
return callbackFn(callbackArg, sent, textlen, sendResult)
end
end

Expand Down

0 comments on commit 75b51f6

Please sign in to comment.