fix marking git-annex clients away when they disconnect
This commit is contained in:
parent
54fcfd42d2
commit
a6d15938ab
2 changed files with 16 additions and 10 deletions
|
@ -63,15 +63,17 @@ applyPresence :: Presence -> Buddy -> Buddy
|
||||||
applyPresence p b = fromMaybe b $! go <$> presenceFrom p
|
applyPresence p b = fromMaybe b $! go <$> presenceFrom p
|
||||||
where
|
where
|
||||||
go jid
|
go jid
|
||||||
| isGitAnnexPresence p = b
|
|
||||||
{ buddyAssistants = addto $ buddyAssistants b }
|
|
||||||
| presenceType p == PresenceAvailable = b
|
|
||||||
{ buddyPresent = addto $ buddyPresent b
|
|
||||||
, buddyAway = removefrom $ buddyAway b
|
|
||||||
}
|
|
||||||
| presenceType p == PresenceUnavailable = b
|
| presenceType p == PresenceUnavailable = b
|
||||||
{ buddyAway = addto $ buddyAway b
|
{ buddyAway = addto $ buddyAway b
|
||||||
, buddyPresent = removefrom $ buddyPresent b
|
, buddyPresent = removefrom $ buddyPresent b
|
||||||
|
, buddyAssistants = removefrom $ buddyAssistants b
|
||||||
|
}
|
||||||
|
| isGitAnnexPresence p = b
|
||||||
|
{ buddyAssistants = addto $ buddyAssistants b
|
||||||
|
, buddyAway = removefrom $ buddyAway b }
|
||||||
|
| presenceType p == PresenceAvailable = b
|
||||||
|
{ buddyPresent = addto $ buddyPresent b
|
||||||
|
, buddyAway = removefrom $ buddyAway b
|
||||||
}
|
}
|
||||||
| otherwise = b
|
| otherwise = b
|
||||||
where
|
where
|
||||||
|
|
|
@ -16,8 +16,12 @@
|
||||||
$else
|
$else
|
||||||
#{name}
|
#{name}
|
||||||
<td>
|
<td>
|
||||||
$if canpair
|
$if away
|
||||||
<a .btn .btn-primary .btn-small href="@{StartXMPPPairR buddyid}">
|
<span .muted>
|
||||||
Start pairing
|
away
|
||||||
$else
|
$else
|
||||||
not using git-annex
|
$if canpair
|
||||||
|
<a .btn .btn-primary .btn-small href="@{StartXMPPPairR buddyid}">
|
||||||
|
Start pairing
|
||||||
|
$else
|
||||||
|
not using git-annex
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue