Sfoglia il codice sorgente

fix crash on unchecking AIM today

Mike 3 anni fa
parent
commit
5497a42e91
2 ha cambiato i file con 13 aggiunte e 2 eliminazioni
  1. 5 2
      oscar/feedbag.go
  2. 8 0
      oscar/fixtures/blocked_user.sql

+ 5 - 2
oscar/feedbag.go

@@ -383,8 +383,11 @@ func (f *feedbagItem) read(r io.Reader) error {
 	}
 
 	return f.TLVPayload.read(bytes.NewBuffer(buf), map[uint16]reflect.Kind{
-		FeedbagAttributesOrder:  reflect.Slice,
-		FeedbagAttributesPdMode: reflect.Uint8,
+		FeedbagAttributesOrder:           reflect.Slice,
+		FeedbagAttributesPdMode:          reflect.Uint8,
+		FeedbagAttributesPdFlags:         reflect.Uint32,
+		FeedbagAttributesBuddyPrefs:      reflect.Uint32,
+		FeedbagAttributesBuddyPrefsValid: reflect.Uint32,
 	})
 }
 

+ 8 - 0
oscar/fixtures/blocked_user.sql

@@ -0,0 +1,8 @@
+INSERT INTO "feedbag" VALUES('userA',0,0,1,'',X'00C800026BEF',1690508233);
+INSERT INTO "feedbag" VALUES('userA',0,13852,3,'userB',NULL,1691286176);
+INSERT INTO "feedbag" VALUES('userA',0,31420,4,'',X'00CA000104',1691286176);
+INSERT INTO "feedbag" VALUES('userA',27631,0,1,'Friends!',X'00C800020FB0',1691286169);
+INSERT INTO "feedbag" VALUES('userA',27631,4016,0,'userB',NULL,1690508233);
+INSERT INTO "feedbag" VALUES('userB',0,0,1,'',X'00C800026EAA',1690508298);
+INSERT INTO "feedbag" VALUES('userB',28330,0,1,'Enemies',X'00C800021FB8',1691180328);
+INSERT INTO "feedbag" VALUES('userB',28330,8120,0,'userA',NULL,1691180328);