0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

modules/web_hook: Support organization/member_invited action.

This commit is contained in:
Jason Volk 2019-08-19 15:29:40 -07:00
parent 50d18d73cb
commit 14a0834c48

View file

@ -936,17 +936,14 @@ github_handle__organization(std::ostream &out,
split(action, '_')
};
out
<< " "
<< "<b>"
<< action_words.first;
out << " " << "<b>";
if(action_words.second)
out
<< " "
<< split(action, '_').second;
<< split(action, '_').second
<< " ";
out << "</b>";
out << action_words.first << "</b>";
if(action == "member_added")
{
@ -988,6 +985,24 @@ github_handle__organization(std::ostream &out,
<< "</a>"
;
}
else if(action == "member_invited")
{
const json::object &invitation
{
content["invitation"]
};
const json::object &user
{
invitation["user"]
};
out << " "
<< "<a href=" << user["html_url"] << ">"
<< json::string(user["login"])
<< "</a>"
;
}
return true;
}