MUC: When closing, only send read marker if we were entered
When using RAI, it's possible to close a MUC without it being entered.
This commit is contained in:
parent
97be0bd8ac
commit
0d9561e666
@ -886,8 +886,11 @@ const ChatRoomMixin = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async close (ev) {
|
async close (ev) {
|
||||||
safeSave(this.session, { 'connection_status': converse.ROOMSTATUS.CLOSING });
|
const { ENTERED, CLOSING } = converse.ROOMSTATUS;
|
||||||
this.sendMarkerForLastMessage('received', true);
|
const was_entered = this.session.get('connection_status') === ENTERED;
|
||||||
|
|
||||||
|
safeSave(this.session, { 'connection_status': CLOSING });
|
||||||
|
was_entered && this.sendMarkerForLastMessage('received', true);
|
||||||
await this.unregisterNickname();
|
await this.unregisterNickname();
|
||||||
await this.leave();
|
await this.leave();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user