Module utils

Source

Functions§

current_user_id
Returns the user ID of the currently logged-in user, if any.
debounce_broadcast
ends_with_href
Returns true if the given text string ends with a valid href attribute opener.
get_or_fetch_event_sender
Returns the sender’s display name if available.
linkify
Looks for bare links in the given text and converts them into proper HTML links.
room_name_or_id
Returns a string representation of the room name or ID.
trim_start_html_whitespace
Removes leading whitespace and HTML whitespace tags (<p> and <br>) from the given text.