GH-9619 GetEmojiImage added to plugin API (#9628)
* GH-9619 conflict fix * GH-9619 fixed conflicts, version comment
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
d1805733fe
Коммит
c3d536c644
@@ -2518,6 +2518,36 @@ func (s *apiRPCServer) ReadFile(args *Z_ReadFileArgs, returns *Z_ReadFileReturns
|
||||
return nil
|
||||
}
|
||||
|
||||
type Z_GetEmojiImageArgs struct {
|
||||
A string
|
||||
}
|
||||
|
||||
type Z_GetEmojiImageReturns struct {
|
||||
A []byte
|
||||
B string
|
||||
C *model.AppError
|
||||
}
|
||||
|
||||
func (g *apiRPCClient) GetEmojiImage(emojiId string) ([]byte, string, *model.AppError) {
|
||||
_args := &Z_GetEmojiImageArgs{emojiId}
|
||||
_returns := &Z_GetEmojiImageReturns{}
|
||||
if err := g.client.Call("Plugin.GetEmojiImage", _args, _returns); err != nil {
|
||||
log.Printf("RPC call to GetEmojiImage API failed: %s", err.Error())
|
||||
}
|
||||
return _returns.A, _returns.B, _returns.C
|
||||
}
|
||||
|
||||
func (s *apiRPCServer) GetEmojiImage(args *Z_GetEmojiImageArgs, returns *Z_GetEmojiImageReturns) error {
|
||||
if hook, ok := s.impl.(interface {
|
||||
GetEmojiImage(emojiId string) ([]byte, string, *model.AppError)
|
||||
}); ok {
|
||||
returns.A, returns.B, returns.C = hook.GetEmojiImage(args.A)
|
||||
} else {
|
||||
return encodableError(fmt.Errorf("API GetEmojiImage called but not implemented."))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Z_KVSetArgs struct {
|
||||
A string
|
||||
B []byte
|
||||
|
||||
Ссылка в новой задаче
Block a user