3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 20:22:39 +01:00

new db without resolvchan

This commit is contained in:
reality 2015-01-09 21:25:33 +00:00
parent 5621bad05c
commit d3633fc21d

View File

@ -12,12 +12,10 @@ var reddit = function(dbot) {
this.internalAPI = {
'getChannelFeeds': function(server, cName, callback) {
dbot.api.users.resolveChannel(server, cName, function(channel) {
if(channel) {
this.db.read('reddit_feeds', channel.id, function(err, cFeeds) {
this.db.read('reddit_feeds', cName + '.' + server, function(err, cFeeds) {
if(err || !cFeeds) {
callback(null, {
'id': channel.id,
'id': cName + '.' + server,
'server': server,
'channel': cName,
'feeds': {}
@ -26,10 +24,6 @@ var reddit = function(dbot) {
callback(null, cFeeds);
}
});
} else {
callback('NoSuchChannel', null);
}
}.bind(this));
}.bind(this),
'updateChannelFeeds': function(cFeeds, callback) {