diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-12-02 20:02:45 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-12-02 20:02:45 +0100 |
commit | 3aacdd395f20fa182413be92a49cbd5c5a780ab9 (patch) | |
tree | 228a44c0b51040c39459f09d011a0a85b0c26ed9 /plugins/Matrix.hpp | |
parent | c15aa4decf523b81d87925942642507fe7d02848 (diff) |
Matrix: extract username if login is email or user id
Diffstat (limited to 'plugins/Matrix.hpp')
-rw-r--r-- | plugins/Matrix.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 0801418..c1ee3bd 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -31,6 +31,10 @@ namespace QuickMedia { std::string pantalaimon_url_to_homeserver_url(Matrix *matrix, const std::string &url); Message* get_latest_message_in_edit_chain(Message *message); bool matrix_gpg_encrypt_for_each_user_in_room(Matrix *matrix, RoomData *room, const std::string &my_gpg_user_id, const std::string &str, std::string &encrypted_str); + // Returns empty string on error + std::string extract_user_name_from_user_id(const std::string &user_id); + // Returns empty string on error + std::string extract_user_name_from_email(const std::string &email); struct MatrixChatBodyDecryptJob { enum class DecryptState { |