parent
95407cc1e0
commit
1cca25e08d
|
@ -189,7 +189,6 @@ QtObject:
|
||||||
else:
|
else:
|
||||||
self.channelGroups[channelGroupId].chats[index] = chat
|
self.channelGroups[channelGroupId].chats[index] = chat
|
||||||
|
|
||||||
|
|
||||||
proc parseChatResponse*(self: Service, response: RpcResponse[JsonNode]): (seq[ChatDto], seq[MessageDto]) =
|
proc parseChatResponse*(self: Service, response: RpcResponse[JsonNode]): (seq[ChatDto], seq[MessageDto]) =
|
||||||
var chats: seq[ChatDto] = @[]
|
var chats: seq[ChatDto] = @[]
|
||||||
var messages: seq[MessageDto] = @[]
|
var messages: seq[MessageDto] = @[]
|
||||||
|
@ -211,17 +210,7 @@ QtObject:
|
||||||
error "no chats or messages in the parsed response"
|
error "no chats or messages in the parsed response"
|
||||||
return
|
return
|
||||||
|
|
||||||
# The reason why we are sending all the messages with responseTo filled in is because
|
for msg in messages:
|
||||||
# the reposnse from status_go doesnt necessarily contain the last reply on the 0th position.
|
|
||||||
var isaReply = false
|
|
||||||
var msg = messages[0]
|
|
||||||
for m in messages:
|
|
||||||
if(m.responseTo.len > 0):
|
|
||||||
isaReply = true
|
|
||||||
msg = m
|
|
||||||
self.events.emit(SIGNAL_SENDING_SUCCESS, MessageSendingSuccess(message: msg, chat: chats[0]))
|
|
||||||
|
|
||||||
if not isaReply:
|
|
||||||
self.events.emit(SIGNAL_SENDING_SUCCESS, MessageSendingSuccess(message: msg, chat: chats[0]))
|
self.events.emit(SIGNAL_SENDING_SUCCESS, MessageSendingSuccess(message: msg, chat: chats[0]))
|
||||||
|
|
||||||
proc processUpdateForTransaction*(self: Service, messageId: string, response: RpcResponse[JsonNode]) =
|
proc processUpdateForTransaction*(self: Service, messageId: string, response: RpcResponse[JsonNode]) =
|
||||||
|
|
|
@ -464,7 +464,7 @@ Item {
|
||||||
index += 8 // "<a href="
|
index += 8 // "<a href="
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
let addrEndIndex = message.indexOf('"', addrIndex)
|
let addrEndIndex = message.indexOf("\"", addrIndex)
|
||||||
if (addrEndIndex < 0) {
|
if (addrEndIndex < 0) {
|
||||||
index += 8 // "<a href="
|
index += 8 // "<a href="
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue