From 353767aee6bfcb5cbc7b9c44e3c440b4f1a2701a Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 8 Feb 2022 12:23:04 -0400 Subject: [PATCH] feat: wakuext_imageServerUrl --- protocol/messenger_images.go | 7 +++++++ services/ext/api.go | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 protocol/messenger_images.go diff --git a/protocol/messenger_images.go b/protocol/messenger_images.go new file mode 100644 index 000000000..c4cff9468 --- /dev/null +++ b/protocol/messenger_images.go @@ -0,0 +1,7 @@ +package protocol + +import "fmt" + +func (m *Messenger) ImageServerURL() string { + return fmt.Sprintf("https://localhost:%d/messages/", m.imageServer.Port) +} diff --git a/services/ext/api.go b/services/ext/api.go index 8c57c2f85..61dafdbc1 100644 --- a/services/ext/api.go +++ b/services/ext/api.go @@ -967,6 +967,10 @@ func (api *PublicAPI) BackupData() (uint64, error) { return api.service.messenger.BackupData(context.Background()) } +func (api *PublicAPI) ImageServerURL() string { + return api.service.messenger.ImageServerURL() +} + // ----- // HELPER // -----