Skip to content

Commit

Permalink
Merge pull request RocketChat#44 from WideChat/karan_fix_merge_bug
Browse files Browse the repository at this point in the history
Fix upstream merge bug: getAvatarURL renamed
  • Loading branch information
ear-dev authored May 29, 2019
2 parents 9c9caa6 + 4b4e8b9 commit 90fb870
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions app/contacts/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { Meteor } from 'meteor/meteor';
import { HTTP } from 'meteor/http';
import _ from 'underscore';

import { getAvatarUrlFromUsername, getUserPreference } from '../../utils';
import { getUserPreference } from '../../utils';
import { getAvatarURL } from '../../utils/lib/getAvatarURL';
import { settings } from '../../settings';

const service = require('./service.js');
Expand Down Expand Up @@ -142,7 +143,7 @@ Meteor.methods({
socialMetaTagInfo: {
socialTitle: user.username,
socialDescription: `Chat with ${ user.username } on ${ server }`,
socialImageLink: `${ server.slice(0, -1) }${ getAvatarUrlFromUsername(user.username) }`,
socialImageLink: `${ server.slice(0, -1) }${ getAvatarURL(user.username) }`,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions app/lib/server/methods/sendInvitationEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { check } from 'meteor/check';
import * as Mailer from '../../../mailer';
import { hasPermission } from '../../../authorization';
import { settings } from '../../../settings';
import { getAvatarUrlFromUsername } from '../../../utils';
import { getAvatarURL } from '../../../utils/lib/getAvatarURL';

let html = '';
Meteor.startup(() => {
Expand Down Expand Up @@ -47,7 +47,7 @@ Meteor.methods({
email,
Invite_Link: Meteor.runAsUser(Meteor.userId(), () => Meteor.call('getInviteLink')),
Username: inviter,
Avatar_Link: `${ settings.get('Site_Url').slice(0, -1) }${ getAvatarUrlFromUsername(Meteor.user().username) }`,
Avatar_Link: `${ settings.get('Site_Url').slice(0, -1) }${ getAvatarURL(Meteor.user().username) }`,
},
lng: language,
});
Expand Down
6 changes: 2 additions & 4 deletions app/utils/lib/placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { Meteor } from 'meteor/meteor';
import s from 'underscore.string';

import { settings } from '../../settings';

import { getAvatarUrlFromUsername } from '..';

import { getAvatarURL } from './getAvatarURL';

export const placeholders = {
replace: (str, data) => {
Expand All @@ -25,7 +23,7 @@ export const placeholders = {
}

if (str.includes('[Avatar_Link]')) {
str = str.replace(/\[Avatar_Link\]/g, `${ settings.get('Site_Url').slice(0, -1) }${ getAvatarUrlFromUsername(Meteor.user().username) }`);
str = str.replace(/\[Avatar_Link\]/g, `${ settings.get('Site_Url').slice(0, -1) }${ getAvatarURL(Meteor.user().username) }`);
}

if (data) {
Expand Down

0 comments on commit 90fb870

Please sign in to comment.