Fix names on private message page

This commit is contained in:
Balazs Toldi 2023-08-15 15:55:13 +02:00
parent 92fcb811c3
commit 9626500586
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58

View File

@ -3,6 +3,7 @@ package eu.toldi.infinityforlemmy.privatemessage
import eu.toldi.infinityforlemmy.RetrofitHolder import eu.toldi.infinityforlemmy.RetrofitHolder
import eu.toldi.infinityforlemmy.apis.LemmyAPI import eu.toldi.infinityforlemmy.apis.LemmyAPI
import eu.toldi.infinityforlemmy.dto.PrivateMessageReadDTO import eu.toldi.infinityforlemmy.dto.PrivateMessageReadDTO
import eu.toldi.infinityforlemmy.utils.LemmyUtils
import org.json.JSONObject import org.json.JSONObject
class LemmyPrivateMessageAPI(val retrofitHolder: RetrofitHolder) { class LemmyPrivateMessageAPI(val retrofitHolder: RetrofitHolder) {
@ -98,10 +99,10 @@ class LemmyPrivateMessageAPI(val retrofitHolder: RetrofitHolder) {
updated = privateMessage.optString("updated", ""), updated = privateMessage.optString("updated", ""),
creatorName = creator.getString("name"), creatorName = creator.getString("name"),
creatorAvatar = creator.optString("avatar", ""), creatorAvatar = creator.optString("avatar", ""),
creatorQualifiedName = creator.getString("actor_id"), creatorQualifiedName = LemmyUtils.actorID2FullName(creator.getString("actor_id")),
recipientName = recipient.getString("name"), recipientName = recipient.getString("name"),
recipientAvatar = recipient.optString("avatar", ""), recipientAvatar = recipient.optString("avatar", ""),
recipientQualifiedName = recipient.getString("actor_id") recipientQualifiedName = LemmyUtils.actorID2FullName(recipient.getString("actor_id"))
) )
} }
} }