mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
accept friendship fix
- insert_member new friend & add to friends mapping - set proper user availability on both sides after friendship established
This commit is contained in:
parent
424bc2bf70
commit
cde31fce59
1 changed files with 9 additions and 2 deletions
|
@ -2422,6 +2422,12 @@ friend(rm, entity, ni, trustee) {
|
||||||
// if (member(ppl, t)) switch(ppl[t][PPL_NOTIFY]) {
|
// if (member(ppl, t)) switch(ppl[t][PPL_NOTIFY]) {
|
||||||
switch (member(ppl, t) ? ppl[t][PPL_NOTIFY] : PPL_NOTIFY_NONE) {
|
switch (member(ppl, t) ? ppl[t][PPL_NOTIFY] : PPL_NOTIFY_NONE) {
|
||||||
case PPL_NOTIFY_OFFERED:
|
case PPL_NOTIFY_OFFERED:
|
||||||
|
sPerson(t, PPL_NOTIFY, PPL_NOTIFY_DEFAULT);
|
||||||
|
friends[entity, FRIEND_NICK] = ni || 1;
|
||||||
|
if (objectp(entity))
|
||||||
|
insert_member(entity);
|
||||||
|
else
|
||||||
|
insert_member(entity, parse_uniform(entity, 1)[URoot]);
|
||||||
// this used to imply a symmetric request for
|
// this used to imply a symmetric request for
|
||||||
// friendship, but we prefer to make it an
|
// friendship, but we prefer to make it an
|
||||||
// informational message instead. the protocol
|
// informational message instead. the protocol
|
||||||
|
@ -2438,6 +2444,8 @@ friend(rm, entity, ni, trustee) {
|
||||||
// within psyc.. even jabber should
|
// within psyc.. even jabber should
|
||||||
// normally auto-acknowledge this request
|
// normally auto-acknowledge this request
|
||||||
sendmsg(entity, "_request_friendship_implied",
|
sendmsg(entity, "_request_friendship_implied",
|
||||||
|
0, ([ "_nick": MYNICK, "_degree_availability": availability ]) );
|
||||||
|
sendmsg(entity, "_request_status_person",
|
||||||
0, ([ "_nick": MYNICK ]) );
|
0, ([ "_nick": MYNICK ]) );
|
||||||
// did i just say something about symmetry?
|
// did i just say something about symmetry?
|
||||||
#ifdef TRY_THIS
|
#ifdef TRY_THIS
|
||||||
|
@ -2450,7 +2458,6 @@ friend(rm, entity, ni, trustee) {
|
||||||
// carrying _presence be enough? well, we
|
// carrying _presence be enough? well, we
|
||||||
// don't have _presence yet
|
// don't have _presence yet
|
||||||
#endif
|
#endif
|
||||||
sPerson(t, PPL_NOTIFY, PPL_NOTIFY_DEFAULT);
|
|
||||||
return 1;
|
return 1;
|
||||||
case PPL_NOTIFY_NONE:
|
case PPL_NOTIFY_NONE:
|
||||||
sPerson(t, PPL_NOTIFY, PPL_NOTIFY_PENDING);
|
sPerson(t, PPL_NOTIFY, PPL_NOTIFY_PENDING);
|
||||||
|
|
Loading…
Reference in a new issue