"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getUserByXmppUsername = getUserByXmppUsername;
var _apiClient = _interopRequireDefault(require("../apiClient"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
async function getUserByXmppUsername(xmppUsername, token) {
  try {
    const res = await _apiClient.default.get(`/apps/users/${xmppUsername}`, {
      headers: {
        Authorization: token
      }
    });
    return res.data.result;
  } catch (error) {
    console.error(`Failed to fetch user: ${xmppUsername}`, error);
    return null;
  }
}
//# sourceMappingURL=roomMembers.api.js.map