Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c193c24be2 | |||
| 4b46212f49 |
+1
-1
@@ -4,7 +4,7 @@
|
||||
"[https://github.com/jaydenkieran Jayden Bailey]"
|
||||
],
|
||||
"url": "https://github.com/jaydenkieran/mw-discord",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"descriptionmsg": "discord-desc",
|
||||
"license-name": "MIT",
|
||||
"manifest_version": 1,
|
||||
|
||||
@@ -32,15 +32,15 @@ class DiscordHooks {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( $wikiPage->getTitle()->inNamespace( NS_FILE ) ) {
|
||||
// Don't continue, it's a file which onUploadComplete will handle instead
|
||||
if ( $wikiPage->getTitle()->inNamespace( NS_FILE ) && is_null( $revision->getPrevious() ) ) {
|
||||
// Don't continue, it's a new file which onUploadComplete will handle instead
|
||||
return true;
|
||||
}
|
||||
|
||||
$msg = wfMessage( 'discord-edit', DiscordUtils::createUserLinks( $user ),
|
||||
DiscordUtils::createMarkdownLink( $wikiPage->getTitle(), $wikiPage->getTitle()->getFullUrl( '', '', $proto = PROTO_HTTP ) ),
|
||||
DiscordUtils::createRevisionText( $revision ),
|
||||
( $summary ? ('`' . DiscordUtils::truncateText( $summary ) . '`' ) : '' ) )->text();
|
||||
( $summary ? ('`' . DiscordUtils::truncateText( $summary ) . '`' ) : '' ) )->plain();
|
||||
DiscordUtils::handleDiscord($msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user