Browse Source

fix group chat offline

pull/18/head
Sun 4 years ago
parent
commit
91bd2c9c87
  1. 2
      src/apps/chat/layer.rs
  2. 4
      src/apps/group_chat/layer.rs
  3. 2
      src/event.rs

2
src/apps/chat/layer.rs

@ -538,7 +538,7 @@ impl LayerEvent { @@ -538,7 +538,7 @@ impl LayerEvent {
&mut results,
)?;
layer.running_mut(&mgid)?.check_offline(&fgid, &addr);
results.rpcs.push(rpc::friend_offline(mgid, fid));
results.rpcs.push(rpc::friend_offline(mgid, fid, &fgid));
}
LayerEvent::Close => {
layer.group.write().await.broadcast(

4
src/apps/group_chat/layer.rs

@ -131,8 +131,8 @@ async fn handle_event( @@ -131,8 +131,8 @@ async fn handle_event(
};
match event {
LayerEvent::Offline(_) => {
results.rpcs.push(rpc::group_offline(mgid, gid));
LayerEvent::Offline(gcd) => {
results.rpcs.push(rpc::group_offline(mgid, gid, &gcd));
}
LayerEvent::OnlinePing(gcd) => {
results.rpcs.push(rpc::group_online(mgid, gid));

2
src/event.rs

@ -517,7 +517,7 @@ impl StatusEvent { @@ -517,7 +517,7 @@ impl StatusEvent {
if running.check_offline(&rgid, &addr) {
let msg = SendMessage::Rpc(
uid,
chat_rpc::friend_offline(ggid, rid),
chat_rpc::friend_offline(ggid, rid, &rgid),
true,
);
let _ = sender.send(msg).await;

Loading…
Cancel
Save