Actioner.Actions to take a message ID
This commit restores the old API prior to the repository commits to make the Actions method of the Actioner interface take in a message ID and return a slice of strings.
This commit is contained in:
parent
086f987b3c
commit
5f7316cf9d
7
cchat.go
7
cchat.go
|
@ -156,11 +156,12 @@ type Actioner interface {
|
|||
// taken from MessageHeader.ID(). This method is allowed to do IO; the frontend
|
||||
// should take care of running it asynchronously.
|
||||
DoAction(action string, id ID) error // Blocking
|
||||
// MessageActions returns a list of possible actions in pretty strings that the
|
||||
// frontend will use to directly display. This method must not do IO.
|
||||
// MessageActions returns a list of possible actions to a message in pretty
|
||||
// strings that the frontend will use to directly display. This method must not
|
||||
// do IO.
|
||||
//
|
||||
// The string slice returned can be nil or empty.
|
||||
Actions() []string
|
||||
Actions(id ID) []string
|
||||
}
|
||||
|
||||
// Attachments extends SendableMessage which adds attachments into the message.
|
||||
|
|
|
@ -1024,15 +1024,16 @@ var Main = Packages{
|
|||
GetterMethod{
|
||||
method: method{
|
||||
Comment: Comment{`
|
||||
MessageActions returns a list of possible actions in
|
||||
pretty strings that the frontend will use to
|
||||
directly display. This method must not do IO.
|
||||
MessageActions returns a list of possible actions to
|
||||
a message in pretty strings that the frontend will
|
||||
use to directly display. This method must not do IO.
|
||||
|
||||
The string slice returned can be nil or empty.
|
||||
`},
|
||||
Name: "Actions",
|
||||
},
|
||||
Returns: []NamedType{{Type: "[]string"}},
|
||||
Parameters: []NamedType{{Name: "id", Type: "ID"}},
|
||||
Returns: []NamedType{{Type: "[]string"}},
|
||||
},
|
||||
IOMethod{
|
||||
method: method{
|
||||
|
|
Loading…
Reference in New Issue