From 3aacdd395f20fa182413be92a49cbd5c5a780ab9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 2 Dec 2022 20:02:45 +0100 Subject: Matrix: extract username if login is email or user id --- plugins/Matrix.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') 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 { -- cgit v1.2.3-70-g09d2