Support RockChat 4.x up
according to field object form https://developer.rocket.chat/reference/api/rest-api/endpoints/team-collaboration-endpoints/chat-endpoints/postmessage#attachment-field-objects . fill information properly.
This commit is contained in:
parent
f9a4dd36e4
commit
8c568c473d
@ -100,9 +100,10 @@ const giteaEvents = {
|
||||
for (var i = 0; i < commits.length; i++) {
|
||||
var commit = commits[i];
|
||||
var shortID = commit.id.substring(0, 7);
|
||||
output = '[#' + shortID + '](' + commit.url + '): \n' + commit.message
|
||||
attachment.fields.push({
|
||||
value: output,
|
||||
short: false,
|
||||
title: '[#' + shortID + '](' + commit.url + '): \n',
|
||||
value: commit.message,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user