Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmbeddable ¶
Returns true if the URL points to an image or other embeddable object
func ShortenUrls ¶
ShortenUrls shortens URLs in the given text. By default, it only shortens URLs if they are longer than the specified maxLength and not embeddable. Supplying a true value to shortenEmbeds or shortenImages will change that behavior. In addition, if shortenImages is true, the shortened URL will have '#.png' appended, in order to enable clients to embed the image. Returns a count of shortened URLs and the (potentially) modified text.
Types ¶
type LinkShortener ¶
LinkShortener shortens any URLs in messages it hears and echos them back to the source.
Click to show internal directories.
Click to hide internal directories.