rename getUsersAnnotations => getUsers

pull/539/head
Ryan Tharp 6 years ago
parent eab53e158e
commit 1a59ef5f92

@ -393,17 +393,17 @@ class LokiAppDotNetServerAPI {
return res.response.data.annotations || []; return res.response.data.annotations || [];
} }
async getUsersAnnotations(pubKeys) { async getUsers(pubKeys) {
if (!pubKeys) { if (!pubKeys) {
log.warn('No pubKeys provided to getUsersAnnotations!'); log.warn('No pubKeys provided to getUsers!');
return []; return [];
} }
if (!pubKeys.length) { if (!pubKeys.length) {
log.warn('No pubKeys given to getUsersAnnotations!'); log.warn('No pubKeys given to getUsers!');
return []; return [];
} }
if (pubKeys.length > 200) { if (pubKeys.length > 200) {
log.warn('Too many pubKeys given to getUsersAnnotations!'); log.warn('Too many pubKeys given to getUsers!');
} }
const res = await this.serverRequest('users', { const res = await this.serverRequest('users', {
method: 'GET', method: 'GET',
@ -979,7 +979,7 @@ class LokiPublicChannelAPI {
// if we have verified primaryKeys then update them // if we have verified primaryKeys then update them
if (verifiedPrimaryPKs.length) { if (verifiedPrimaryPKs.length) {
// get final list of verified chat server profile names // get final list of verified chat server profile names
const verifiedDeviceResults = await this.serverAPI.getUsersAnnotations( const verifiedDeviceResults = await this.serverAPI.getUsers(
verifiedPrimaryPKs verifiedPrimaryPKs
); );
// console.log('verifiedDeviceResults', verifiedDeviceResults) // console.log('verifiedDeviceResults', verifiedDeviceResults)

Loading…
Cancel
Save