mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 00:14:07 +01:00
modules/web_hook: Improve github webhook alt-text for non-html clients.
This commit is contained in:
parent
c56e16e20c
commit
1abc66dccc
1 changed files with 7 additions and 3 deletions
|
@ -290,14 +290,18 @@ github_handle(client &client,
|
||||||
string_view(webhook_user), my_host()
|
string_view(webhook_user), my_host()
|
||||||
};
|
};
|
||||||
|
|
||||||
const json::string &apropos_hash
|
const fmt::bsprintf<512> alt_msg
|
||||||
{
|
{
|
||||||
github_find_commit_hash(request.content)
|
"%s by %s to %s",
|
||||||
|
type,
|
||||||
|
github_find_party(request.content).first,
|
||||||
|
github_find_repo(request.content).first,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto evid
|
const auto evid
|
||||||
{
|
{
|
||||||
m::msghtml(room_id, user_id, view(out, buf), apropos_hash, "m.notice")
|
m::msghtml(room_id, user_id, view(out, buf), alt_msg, "m.notice")
|
||||||
};
|
};
|
||||||
|
|
||||||
log::info
|
log::info
|
||||||
|
|
Loading…
Reference in a new issue