Add topic to channel objects

This commit is contained in:
Basti 2021-08-20 15:08:30 +02:00
parent ec6bb0b2ba
commit e06a4f0ac9
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
2 changed files with 4 additions and 1 deletions

2
dist/build.js vendored
View File

@ -1 +1 @@
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){e.declareType("chat-account",{type:"object",properties:{id:{type:"string"},protocol:{type:"string",default:"IRC",enum:["IRC","XMPP"]},username:{type:["string","null"]},password:{type:["string","null"]},nickname:{type:["string","null"]},server:{type:"object",properties:{hostname:{type:["string","null"]},port:{type:["number","null"]},secure:{type:"boolean"}}},botkaURL:{type:["string","null"]}},required:["id","protocol"]}),e.declareType("chat-channel",{type:"object",properties:{id:{type:"string"},accountId:{type:"string"},displayName:{type:["string","null"]},userNickname:{type:["string","null"]}},required:["id","accountId"]});var t={accounts:{getIds:function(){return e.getListing("chat/").then(function(e){return Object.keys(e).map(function(e){return e.replace(/\/$/,"")})})},getConfig:function(t){return e.getObject("chat/"+t+"/account")},storeConfig:function(t){return e.storeObject("chat-account","chat/"+t.id+"/account",t)},remove:function(t){return e.remove("chat/"+t+"/account")}},channels:{getAll:function(t){return e.getAll("chat/"+t+"/channels/")},store:function(t){return e.storeObject("chat-channel","chat/"+t.accountId+"/channels/"+t.id,t)},remove:function(t,n){return e.remove("chat/"+t+"/channels/"+n)}},client:e};return{exports:t}};t.default={name:"kosmos",builder:n}}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){e.declareType("chat-account",{type:"object",properties:{id:{type:"string"},protocol:{type:"string",default:"IRC",enum:["IRC","XMPP"]},username:{type:["string","null"]},password:{type:["string","null"]},nickname:{type:["string","null"]},server:{type:"object",properties:{hostname:{type:["string","null"]},port:{type:["number","null"]},secure:{type:"boolean"}}},botkaURL:{type:["string","null"]}},required:["id","protocol"]}),e.declareType("chat-channel",{type:"object",properties:{id:{type:"string"},accountId:{type:"string"},displayName:{type:["string","null"]},userNickname:{type:["string","null"]},topic:{type:["string","null"]}},required:["id","accountId"]});var t={accounts:{getIds:function(){return e.getListing("chat/").then(function(e){return Object.keys(e).map(function(e){return e.replace(/\/$/,"")})})},getConfig:function(t){return e.getObject("chat/"+t+"/account")},storeConfig:function(t){return e.storeObject("chat-account","chat/"+t.id+"/account",t)},remove:function(t){return e.remove("chat/"+t+"/account")}},channels:{getAll:function(t){return e.getAll("chat/"+t+"/channels/")},store:function(t){return e.storeObject("chat-channel","chat/"+t.accountId+"/channels/"+t.id,t)},remove:function(t,n){return e.remove("chat/"+t+"/channels/"+n)}},client:e};return{exports:t}};t.default={name:"kosmos",builder:n}}])});

View File

@ -62,6 +62,9 @@ const Kosmos = function(privateClient/*, publicClient*/) {
},
"userNickname": {
"type": [ "string", "null" ]
},
"topic": {
"type": [ "string", "null" ]
}
},
"required": [