mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-22 11:14:55 +08:00
add FixTweet, removed c.vxtwitter
This commit is contained in:
parent
c5c6683459
commit
2687c3be88
@ -5,7 +5,7 @@ MORNY_ARCHIVE_NAME = morny-coeur
|
||||
MORNY_CODE_STORE = https://github.com/Eyre-S/Coeur-Morny-Cono
|
||||
MORNY_COMMIT_PATH = https://github.com/Eyre-S/Coeur-Morny-Cono/commit/%s
|
||||
|
||||
VERSION = 1.3.0-dev6
|
||||
VERSION = 1.3.0-dev7
|
||||
|
||||
USE_DELTA = false
|
||||
VERSION_DELTA =
|
||||
|
@ -10,10 +10,10 @@ import scala.util.matching.Regex
|
||||
class ShareToolTwitter extends ITelegramQuery {
|
||||
|
||||
private val TITLE_VX = "[tweet] Share as VxTwitter"
|
||||
private val TITLE_VX_COMBINED = "[tweet] Share as VxTwitter(combination)"
|
||||
private val ID_PREFIX_VX = "[morny/share/twitter/vxtwi]"
|
||||
private val ID_PREFIX_VX_COMBINED = "[morny/share/twitter/vxtwi_combine]"
|
||||
private val REGEX_TWEET_LINK: Regex = "^(?:https?://)?((?:(?:c\\.)?vx|fx|www\\.)?twitter\\.com)/((\\w+)/status/(\\d+)(?:/photo/(\\d+))?)/?(\\?[\\w&=-]+)?$"r
|
||||
private val TITLE_FX = "[tweet] Share as Fix-Tweet"
|
||||
private val ID_PREFIX_FX = "[morny/share/twitter/fxtwi]"
|
||||
private val REGEX_TWEET_LINK: Regex = "^(?:https?://)?((?:(?:c\\.)?vx|fx|www\\.)?twitter|(?:www\\.|fixup)?x)\\.com/((\\w+)/status/(\\d+)(?:/photo/(\\d+))?)/?(\\?[\\w&=-]+)?$"r
|
||||
|
||||
override def query (event: Update): List[InlineQueryUnit[_]] | Null = {
|
||||
|
||||
@ -24,12 +24,12 @@ class ShareToolTwitter extends ITelegramQuery {
|
||||
case REGEX_TWEET_LINK(_, _path_data, _, _, _, _) =>
|
||||
List(
|
||||
InlineQueryUnit(InlineQueryResultArticle(
|
||||
inlineQueryId(ID_PREFIX_VX+event.inlineQuery.query), TITLE_VX,
|
||||
s"https://vxtwitter.com/$_path_data"
|
||||
inlineQueryId(ID_PREFIX_FX + event.inlineQuery.query), TITLE_FX,
|
||||
s"https://fxtwitter.com/$_path_data"
|
||||
)),
|
||||
InlineQueryUnit(InlineQueryResultArticle(
|
||||
inlineQueryId(ID_PREFIX_VX_COMBINED+event.inlineQuery.query), TITLE_VX_COMBINED,
|
||||
s"https://c.vxtwitter.com/$_path_data"
|
||||
inlineQueryId(ID_PREFIX_VX+event.inlineQuery.query), TITLE_VX,
|
||||
s"https://vxtwitter.com/$_path_data"
|
||||
))
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user