mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-23 18:11:40 +00:00
Get the list of custom emojies
This commit is contained in:
@ -285,4 +285,18 @@ export class SettingsController {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an emoji into an API entry
|
||||
*
|
||||
* @param c The emoji to convert
|
||||
*/
|
||||
public static CustomEmojiToAPI(c: CustomEmoji) : any {
|
||||
return {
|
||||
id: c.id,
|
||||
userID: c.userID,
|
||||
shorcut: c.shorcut,
|
||||
url: c.url
|
||||
}
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ import { AccountImage, AccountImageVisibilityLevel } from "../entities/AccountIm
|
||||
import { BackgroundImageHelper } from "../helpers/BackgroundImageHelper";
|
||||
import { LikesHelper, LikesType } from "../helpers/LikesHelper";
|
||||
import { FriendsHelper } from "../helpers/FriendsHelper";
|
||||
import { CustomEmojisHelper } from "../helpers/CustomEmojisHelper";
|
||||
import { SettingsController } from "./SettingsController";
|
||||
|
||||
/**
|
||||
* User information controller
|
||||
@ -76,7 +78,8 @@ export class UserController {
|
||||
"publicPage": user.pageStatus == UserPageStatus.PUBLIC,
|
||||
"openPage": user.pageStatus == UserPageStatus.OPEN,
|
||||
"virtualDirectory": user.hasVirtualDirectory ? user.virtualDirectory : "",
|
||||
"accountImage": await this.GetAccountImageURL(user.accountImage, h)
|
||||
"accountImage": await this.GetAccountImageURL(user.accountImage, h),
|
||||
"customEmojis": (await CustomEmojisHelper.GetListUser(user.id)).map(SettingsController.CustomEmojiToAPI)
|
||||
};
|
||||
|
||||
if(advanced) {
|
||||
|
Reference in New Issue
Block a user