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:
parent
50d18d73cb
commit
14a0834c48
1 changed files with 22 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue