fix(service): Fix defaultMuteState not being honoured

This commit is contained in:
2022-12-10 12:02:09 +01:00
parent a08a110ef6
commit 21878ae135
2 changed files with 21 additions and 10 deletions

View File

@@ -271,7 +271,16 @@ class ConversationBloc extends Bloc<ConversationEvent, ConversationState> {
}
Future<void> _onJidAdded(JidAddedEvent event, Emitter<ConversationState> emit) async {
// TODO(Unknown): Maybe have some state here
// Just update the state here. If it does not work, then the next conversation
// update will fix it.
emit(
state.copyWith(
conversation: state.conversation!.copyWith(
inRoster: true,
),
),
);
await MoxplatformPlugin.handler.getDataSender().sendData(
AddContactCommand(jid: state.conversation!.jid),
);