fix gomobile/FlwtchWorker calls incorrectly casting Long for SetContactAttribute and sendInvite #290
|
@ -239,7 +239,7 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
|
|||
"SendInvitation" -> {
|
||||
val profile = (a.get("ProfileOnion") as? String) ?: ""
|
||||
val conversation = a.getInt("conversation").toLong()
|
||||
val target = (a.get("target") as? Long) ?: -1
|
||||
val target = a.getInt("conversation").toLong()
|
||||
Cwtch.sendInvitation(profile, conversation, target)
|
||||
}
|
||||
"ShareFile" -> {
|
||||
|
@ -300,12 +300,12 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
|
|||
}
|
||||
"ArchiveConversation" -> {
|
||||
val profile = (a.get("ProfileOnion") as? String) ?: ""
|
||||
val conversation = (a.get("conversation") as? Long) ?: -1
|
||||
val conversation = a.getInt("conversation").toLong()
|
||||
Cwtch.archiveConversation(profile, conversation)
|
||||
}
|
||||
"DeleteConversation" -> {
|
||||
val profile = (a.get("ProfileOnion") as? String) ?: ""
|
||||
val conversation = (a.get("conversation") as? Long) ?: -1
|
||||
val conversation = a.getInt("conversation").toLong()
|
||||
Cwtch.deleteContact(profile, conversation)
|
||||
}
|
||||
"SetProfileAttribute" -> {
|
||||
|
@ -316,7 +316,7 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
|
|||
}
|
||||
"SetConversationAttribute" -> {
|
||||
val profile = (a.get("ProfileOnion") as? String) ?: ""
|
||||
val conversation = (a.get("conversation") as? Long) ?: -1
|
||||
val conversation = a.getInt("conversation").toLong()
|
||||
val key = (a.get("Key") as? String) ?: ""
|
||||
val v = (a.get("Val") as? String) ?: ""
|
||||
Cwtch.setConversationAttribute(profile, conversation, key, v)
|
||||
|
|
|
@ -96,8 +96,8 @@ class CwtchNotifier {
|
|||
}
|
||||
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(int.parse(data["ConversationID"])) == null) {
|
||||
profileCN.getProfile(data["ProfileOnion"])?.contactList.add(ContactInfoState(data["ProfileOnion"], int.parse(data["ConversationID"]), data["GroupID"],
|
||||
blocked: data["blocked"] == "true",
|
||||
accepted: data["accepted"] == "true",
|
||||
blocked: false, // we created
|
||||
accepted: true, // we created
|
||||
imagePath: data["PicturePath"],
|
||||
nickname: data["GroupName"],
|
||||
status: status,
|
||||
|
@ -288,8 +288,8 @@ class CwtchNotifier {
|
|||
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(groupInvite["GroupID"]) == null) {
|
||||
var identifier = int.parse(data["ConversationID"]);
|
||||
profileCN.getProfile(data["ProfileOnion"])?.contactList.add(ContactInfoState(data["ProfileOnion"], identifier, groupInvite["GroupID"],
|
||||
blocked: data["blocked"] == "true",
|
||||
accepted: data["accepted"] == "true",
|
||||
blocked: false, // NewGroup only issued on accepting invite
|
||||
accepted: true, // NewGroup only issued on accepting invite
|
||||
imagePath: data["PicturePath"],
|
||||
nickname: groupInvite["GroupName"],
|
||||
server: groupInvite["ServerHost"],
|
||||
|
|
Loading…
Reference in New Issue