~bfiedler/go-threema

d4f45313f5ad2f56b583add868b71fa5a4efa16c — Ben Fiedler 1 year, 8 months ago 6b3757d v0.2.0
Document allowed file types
1 files changed, 4 insertions(+), 0 deletions(-)

M client/client.go
M client/client.go => client/client.go +4 -0
@@ 437,6 437,10 @@ func (c *E2EClient) SendTextMessageToEmail(address string, msg string) error {
// Send an image to the given Threema ID.
//
// Costs 2 credits (1 to upload image, 1 to send message)
//
// Allowed file types (list not exhaustive)
//   * JPEG
//   * PNG
func (c *E2EClient) SendImage(to ThreemaID, image io.Reader) error {
	r := io.LimitReader(image, maxImageSizeInBytes)
	data, err := ioutil.ReadAll(r)