mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
MESSENGER-5740 fix double notes rooms on connection erros
This commit is contained in:
@@ -102,11 +102,19 @@ extension PersonalNotesDefaultService : PersonalNotesService {
|
|||||||
func createPersonalNotesRoomIfNeeded() {
|
func createPersonalNotesRoomIfNeeded() {
|
||||||
|
|
||||||
self.fetchRoomID() { (roomId, error) in
|
self.fetchRoomID() { (roomId, error) in
|
||||||
if let mxerror = error as? MXError {
|
|
||||||
if let errcode = mxerror.userInfo["errcode"] as? String {
|
// bwi #5740 don't create room after connection error that is not translated to mxerror
|
||||||
if errcode != kMXErrCodeStringNotFound {
|
if let error = error {
|
||||||
// request error, don't create room
|
if MXError.isMXError(error) {
|
||||||
return
|
if let mxError = MXError(nsError: error) {
|
||||||
|
if let errcode = mxError.userInfo["errcode"] as? String {
|
||||||
|
if errcode != kMXErrCodeStringNotFound {
|
||||||
|
// request error, don't create room
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user