-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix test and move Marks to a single file
- Loading branch information
1 parent
d27392b
commit f7ad14a
Showing
3 changed files
with
54 additions
and
35 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...e/src/commonMain/kotlin/love/forte/simbot/component/telegram/core/message/SendingMarks.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2024. ForteScarlet. | ||
* | ||
* This file is part of simbot-component-telegram. | ||
* | ||
* simbot-component-telegram is free software: you can redistribute it and/or modify it under the terms | ||
* of the GNU Lesser General Public License as published by the Free Software Foundation, | ||
* either version 3 of the License, or (at your option) any later version. | ||
* | ||
* simbot-component-telegram is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along with simbot-component-telegram. | ||
* If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package love.forte.simbot.component.telegram.core.message | ||
|
||
internal const val PROTECT_CONTENT_MARK: Int = 1 shl 0 | ||
internal const val DISABLE_NOTIFICATION_MARK: Int = 1 shl 1 | ||
|
||
|
||
internal class SendingMarks( | ||
private val value: Int, | ||
) { | ||
val isProtectContent: Boolean | ||
get() = value and PROTECT_CONTENT_MARK != 0 | ||
|
||
val isDisableNotification: Boolean | ||
get() = value and DISABLE_NOTIFICATION_MARK != 0 | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters