Changeset - bf9f7b7a4163
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2015-12-08 18:47:19
jkaluza@redhat.com
Slack: parse the bots names from RTM
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
spectrum/src/frontends/slack/SlackAPI.cpp
Show inline comments
 
@@ -293,28 +293,28 @@ void SlackAPI::getSlackUserInfo(HTTPRequest *req, bool ok, rapidjson::Document &
 
		}
 
	}
 

	
 
	GET_ARRAY(resp, bots);
 

	
 
	for (int i = 0; i < bots.Size(); i++) {
 
		if (!bots[i].IsObject()) {
 
			continue;
 
		}
 

	
 
		SlackUserInfo info;
 

	
 
		STORE_STRING(users[i], id);
 
		STORE_STRING(bots[i], id);
 
		info.id = id;
 

	
 
		STORE_STRING(users[i], name);
 
		STORE_STRING(bots[i], name);
 
		info.name = name;
 

	
 
		info.isPrimaryOwner = 0;
 

	
 
		ret[info.id] = info;
 
		LOG4CXX_INFO(logger, info.id << " " << info.name);
 
	}
 

	
 
	return;
 
}
 

	
 
std::string SlackAPI::SlackObjectToPlainText(const std::string &object, bool isChannel, bool returnName) {
0 comments (0 inline, 0 general)