mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Autocomplete: Fix name of response tag.
This commit is contained in:
parent
a55fbab591
commit
fbf9f0166d
@ -42,11 +42,11 @@ except ImportError:
|
||||
|
||||
|
||||
REQUEST_TAG = "+draft/autocomplete-request"
|
||||
RESPONSE_TAG = "+draft/autocomplete"
|
||||
RESPONSE_TAG = "+draft/autocomplete-response"
|
||||
|
||||
|
||||
def _getAutocompleteResponse(irc, msg, payload):
|
||||
"""Returns the value of the +draft/autocomplete tag for the given
|
||||
"""Returns the value of the +draft/autocomplete-response tag for the given
|
||||
+draft/autocomplete-request payload."""
|
||||
tokens = callbacks.tokenize(payload, channel=msg.channel, network=irc.network)
|
||||
normalized_payload = " ".join(tokens)
|
||||
@ -130,7 +130,7 @@ class Autocomplete(callbacks.Plugin):
|
||||
ircmsgs.IrcMsg(
|
||||
server_tags={
|
||||
"+draft/reply": msgid,
|
||||
"+draft/autocomplete": autocomplete_response,
|
||||
RESPONSE_TAG: autocomplete_response,
|
||||
},
|
||||
command="TAGMSG",
|
||||
args=[target],
|
||||
|
@ -55,7 +55,7 @@ class AutocompleteTestCase(PluginTestCase):
|
||||
ircmsgs.IrcMsg(
|
||||
server_tags={
|
||||
"+draft/reply": "1234",
|
||||
"+draft/autocomplete": expectedResponse,
|
||||
"+draft/autocomplete-response": expectedResponse,
|
||||
},
|
||||
command="TAGMSG",
|
||||
args=["foo"],
|
||||
@ -103,12 +103,13 @@ class AutocompleteChannelTestCase(ChannelPluginTestCase):
|
||||
ircmsgs.IrcMsg(
|
||||
server_tags={
|
||||
"+draft/reply": "1234",
|
||||
"+draft/autocomplete": expectedResponse,
|
||||
"+draft/autocomplete-response": expectedResponse,
|
||||
},
|
||||
command="TAGMSG",
|
||||
args=[self.channel],
|
||||
),
|
||||
)
|
||||
|
||||
def testResponse(self):
|
||||
with conf.supybot.protocols.irc.experimentalExtensions.context(True):
|
||||
with conf.supybot.plugins.Autocomplete.enabled.context(True):
|
||||
|
Loading…
Reference in New Issue
Block a user