某のAPI変更に関する修正 see https://github.com/Kinoshita0623/MisskeyAndroidClient/issues/55
This commit is contained in:
parent
f6328b3d8a
commit
246af224a9
|
@ -244,6 +244,7 @@ class TootInstance(parser: TootParser, src: JsonObject) {
|
|||
|
||||
val MISSKEY_VERSION_11 = VersionString("11.0")
|
||||
val MISSKEY_VERSION_12 = VersionString("12.0")
|
||||
val MISSKEY_VERSION_12_75_0 = VersionString("12.75.0")
|
||||
|
||||
private val reDigits = """(\d+)""".asciiPattern()
|
||||
|
||||
|
|
|
@ -475,12 +475,17 @@ class StreamConnection(
|
|||
val socket = socket.get()
|
||||
if (isDisposed.get() || socket == null) return
|
||||
|
||||
val type = when{
|
||||
acctGroup.ti.versionGE(TootInstance.MISSKEY_VERSION_12_75_0) -> "sr"
|
||||
else -> "subNote"
|
||||
}
|
||||
|
||||
for (id in list) {
|
||||
if (id.isDefault) continue
|
||||
synchronized(capturedId) {
|
||||
if (capturedId.contains(id)) return
|
||||
try {
|
||||
if (socket.send("""{"type":"subNote","body": {"id":"$id"}}""")) {
|
||||
if (socket.send("""{"type":"$type","body":{"id":"$id"}}""")) {
|
||||
capturedId.add(id)
|
||||
} else {
|
||||
log.w("capture failed.")
|
||||
|
|
Loading…
Reference in New Issue