Data updates
Beyond ServiceHooks, NCChatUIApplication exposes cache helpers so you can refresh UI after profile changes.
tip
app refers to the instance returned from NCChatUIApplication.initialize. Call these update APIs after ready().
Update a user
updateUserProfile refreshes display fields such as nickname and avatar.
TypeScript
app.updateUserProfile({
userId: 'userId',
name: 'Display name',
avatarUrl: 'https://example.com/avatar.png',
});
Update a group
updateGroupProfile updates name, avatar, member count, etc. (not the full member list).
TypeScript
app.updateGroupProfile({
groupId: 'groupId',
name: 'Group name',
avatarUrl: 'https://example.com/group.png',
memberCount: 10,
});
Update presence
TypeScript
app.updateUserOnlineStatus('userId', true);
Update group members
These three helpers update ChatUI's local cache and UI state only. They do not call group-management server APIs.
Add members
TypeScript
app.addGroupMembers('groupId', [
{ userId: 'user-01', nickname: 'Member 01' },
{ userId: 'user-02' },
]);
Remove members
TypeScript
app.removeGroupMembers('groupId', ['user-01', 'user-02']);
Replace the roster
TypeScript
app.updateGroupMembers('groupId', [
{ userId: 'user-01', nickname: 'Member 01' },
{ userId: 'user-02' },
]);