Skip to content

Commit d030d52

Browse files
committed
remove client related extensions
Signed-off-by: alperozturk <[email protected]>
1 parent d4a2418 commit d030d52

File tree

1 file changed

+1
-26
lines changed
  • library/src/main/java/com/owncloud/android/lib/resources/assistant/chat/model

1 file changed

+1
-26
lines changed

library/src/main/java/com/owncloud/android/lib/resources/assistant/chat/model/ChatMessage.kt

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
package com.owncloud.android.lib.resources.assistant.chat.model
1010

1111
import com.google.gson.annotations.SerializedName
12-
import java.time.ZoneId
13-
import java.time.format.DateTimeFormatter
14-
import java.util.Locale
15-
import kotlin.time.ExperimentalTime
16-
import kotlin.time.Instant
17-
import kotlin.time.toJavaInstant
1812

1913
data class ChatMessage(
2014
val id: Long,
@@ -27,23 +21,4 @@ data class ChatMessage(
2721
val ocpTaskId: Any?,
2822
val sources: String,
2923
val attachments: List<Any?>
30-
) {
31-
companion object {
32-
private const val TIMESTAMP_PRESENTATION_TIME_PATTERN = "HH:mm"
33-
}
34-
35-
fun isHuman(): Boolean = role == "human"
36-
37-
@OptIn(ExperimentalTime::class)
38-
fun timestampRepresentation(): String {
39-
val instant = Instant.fromEpochSeconds(timestamp)
40-
val deviceZone = ZoneId.systemDefault()
41-
42-
val formatter =
43-
DateTimeFormatter
44-
.ofPattern(TIMESTAMP_PRESENTATION_TIME_PATTERN, Locale.getDefault())
45-
.withZone(deviceZone)
46-
47-
return formatter.format(instant.toJavaInstant())
48-
}
49-
}
24+
)

0 commit comments

Comments
 (0)