diff --git a/webui-src/app/chat/chat.js b/webui-src/app/chat/chat.js index b9d903a..ffe077e 100644 --- a/webui-src/app/chat/chat.js +++ b/webui-src/app/chat/chat.js @@ -6,7 +6,7 @@ const peopleUtil = require('people/people_util'); function loadLobbyDetails(id, apply) { rs.rsJsonApiRequest( - '/rsMsgs/getChatLobbyInfo', + '/rsChats/getChatLobbyInfo', { id, }, @@ -45,7 +45,7 @@ const ChatRoomsModel = { // TODO: this doesn't preserve id of rooms, // use regex on response to extract ids. rs.rsJsonApiRequest( - '/rsMsgs/getListOfNearbyChatLobbies', + '/rsChats/getListOfNearbyChatLobbies', {}, (data) => (ChatRoomsModel.allRooms = sortLobbies(data.public_lobbies)) ); @@ -53,7 +53,7 @@ const ChatRoomsModel = { loadSubscribedRooms(after = null) { // ChatRoomsModel.subscribedRooms = {}; rs.rsJsonApiRequest( - '/rsMsgs/getChatLobbyList', + '/rsChats/getChatLobbyList', {}, // JS uses double precision numbers of 64 bit. It is equivalent // to 53 bits of precision. All large precision ints will @@ -126,7 +126,7 @@ const ChatLobbyModel = { setupAction: (lobbyId, nick) => {}, setIdentity(lobbyId, nick) { rs.rsJsonApiRequest( - '/rsMsgs/setIdentityForChatLobby', + '/rsChats/setIdentityForChatLobby', {}, () => m.route.set('/chat/:lobby_id', { lobbyId }), true, @@ -138,7 +138,7 @@ const ChatLobbyModel = { enterPublicLobby(lobbyId, nick) { console.info('joinVisibleChatLobby', nick, '@', lobbyId); rs.rsJsonApiRequest( - '/rsMsgs/joinVisibleChatLobby', + '/rsChats/joinVisibleChatLobby', {}, () => { loadLobbyDetails(lobbyId, (info) => { @@ -157,7 +157,7 @@ const ChatLobbyModel = { unsubscribeChatLobby(lobbyId, follow) { console.info('unsubscribe lobby', lobbyId); rs.rsJsonApiRequest( - '/rsMsgs/unsubscribeChatLobby', + '/rsChats/unsubscribeChatLobby', {}, () => ChatRoomsModel.loadSubscribedRooms(follow), true, @@ -212,7 +212,7 @@ const ChatLobbyModel = { }, sendMessage(msg, onsuccess) { rs.rsJsonApiRequest( - '/rsmsgs/sendChat', + '/rsChats/sendChat', {}, () => { // adding own message to log @@ -466,7 +466,7 @@ const LayoutSetup = () => { }; /* - /rsMsgs/initiateDistantChatConnexion + /rsChats/initiateDistantChatConnexion * @param[in] to_pid RsGxsId to start the connection * @param[in] from_pid owned RsGxsId who start the connection * @param[out] pid distant chat id @@ -488,7 +488,7 @@ const LayoutCreateDistant = () => { { onclick: () => rs.rsJsonApiRequest( - '/rsMsgs/initiateDistantChatConnexion', + '/rsChats/initiateDistantChatConnexion', { to_pid: m.route.param('lobby'), from_pid: id, diff --git a/webui-src/app/config/config_mail.js b/webui-src/app/config/config_mail.js index a71a9e6..ad2fe63 100644 --- a/webui-src/app/config/config_mail.js +++ b/webui-src/app/config/config_mail.js @@ -20,13 +20,13 @@ async function handleSubmit(tagId) { if (tagNameAlreadyExists) { alert('Tag Name Already Exists'); } else { - rs.rsJsonApiRequest('/rsMsgs/setMessageTagType', { + rs.rsJsonApiRequest('/rsMail/setMessageTagType', { tagId: msgTagObj.tagId, text: msgTagObj.tagName, rgb_color: parseInt(msgTagObj.tagColor.substring(1), 16), }); modalContainer.style.display = 'none'; - rs.rsJsonApiRequest('/rsMsgs/getMessageTagTypes').then((res) => (tagArr = res.body.tags.types)); + rs.rsJsonApiRequest('/rsMail/getMessageTagTypes').then((res) => (tagArr = res.body.tags.types)); } } @@ -68,10 +68,10 @@ const Mail = () => { let distantMessagingPermissionFlag = 0; return { oninit: () => { - rs.rsJsonApiRequest('/rsMsgs/getMessageTagTypes').then( + rs.rsJsonApiRequest('/rsMail/getMessageTagTypes').then( (res) => (tagArr = res.body.tags.types) ); - rs.rsJsonApiRequest('/rsMsgs/getDistantMessagingPermissionFlags').then( + rs.rsJsonApiRequest('/rsMail/getDistantMessagingPermissionFlags').then( (res) => (distantMessagingPermissionFlag = res.body.retval) ); }, @@ -87,7 +87,7 @@ const Mail = () => { value: distantMessagingPermissionFlag, oninput: (e) => (distantMessagingPermissionFlag = e.target.value), onchange: () => { - rs.rsJsonApiRequest('/rsMsgs/setDistantMessagingPermissionFlags', { + rs.rsJsonApiRequest('/rsMail/setDistantMessagingPermissionFlags', { flags: parseInt(distantMessagingPermissionFlag), }); }, @@ -164,7 +164,7 @@ const Mail = () => { 'button.red', { onclick: () => { - rs.rsJsonApiRequest('/rsMsgs/removeMessageTagType', { + rs.rsJsonApiRequest('/rsMail/removeMessageTagType', { tagId: tag.key, }).then((res) => { if (res.body.retval) diff --git a/webui-src/app/mail/mail_attachment.js b/webui-src/app/mail/mail_attachment.js index 3825364..042d9e6 100644 --- a/webui-src/app/mail/mail_attachment.js +++ b/webui-src/app/mail/mail_attachment.js @@ -9,7 +9,7 @@ const Layout = () => { return { oninit: (v) => { v.attrs.list.forEach(async (element) => { - const res = await rs.rsJsonApiRequest('/rsMsgs/getMessage', { + const res = await rs.rsJsonApiRequest('/rsMail/getMessage', { msgId: element.msgId, }); if (res.body.retval) { diff --git a/webui-src/app/mail/mail_compose.js b/webui-src/app/mail/mail_compose.js index fbf8a58..faff4f9 100644 --- a/webui-src/app/mail/mail_compose.js +++ b/webui-src/app/mail/mail_compose.js @@ -139,7 +139,7 @@ const Layout = () => { const { identity: from, subject } = Data; const mailBodyElement = document.querySelector('#composerMailBody'); const mailBody = `